feat(app): add MFA and tsdocker release
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import type { MfaManager } from './classes.mfamanager.js';
|
||||
|
||||
@plugins.smartdata.Manager()
|
||||
export class PasskeyCredential extends plugins.smartdata.SmartDataDbDoc<PasskeyCredential, any, MfaManager> {
|
||||
@plugins.smartdata.unI()
|
||||
public id: string;
|
||||
|
||||
@plugins.smartdata.svDb()
|
||||
public data = {
|
||||
userId: '',
|
||||
label: '',
|
||||
credentialId: '',
|
||||
publicKeyBase64: '',
|
||||
counter: 0,
|
||||
deviceType: 'singleDevice' as 'singleDevice' | 'multiDevice',
|
||||
backedUp: false,
|
||||
transports: [] as string[],
|
||||
status: 'active' as 'active' | 'revoked',
|
||||
createdAt: 0,
|
||||
lastUsedAt: null as number | null,
|
||||
revokedAt: null as number | null,
|
||||
};
|
||||
|
||||
public isActive() {
|
||||
return this.data.status === 'active';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user