feat(reception): add passport device authentication flows and alert delivery management
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
import type { PassportManager } from './classes.passportmanager.js';
|
||||
|
||||
@plugins.smartdata.Manager()
|
||||
export class PassportDevice extends plugins.smartdata.SmartDataDbDoc<
|
||||
PassportDevice,
|
||||
plugins.idpInterfaces.data.IPassportDevice,
|
||||
PassportManager
|
||||
> {
|
||||
@plugins.smartdata.unI()
|
||||
public id: string;
|
||||
|
||||
@plugins.smartdata.svDb()
|
||||
public data: plugins.idpInterfaces.data.IPassportDevice['data'] = {
|
||||
userId: '',
|
||||
label: '',
|
||||
platform: 'unknown',
|
||||
status: 'active',
|
||||
publicKeyAlgorithm: 'p256',
|
||||
publicKeyX963Base64: '',
|
||||
capabilities: {
|
||||
gps: false,
|
||||
nfc: false,
|
||||
push: false,
|
||||
},
|
||||
pushRegistration: undefined,
|
||||
appVersion: undefined,
|
||||
createdAt: 0,
|
||||
lastSeenAt: undefined,
|
||||
lastChallengeAt: undefined,
|
||||
};
|
||||
|
||||
public isActive() {
|
||||
return this.data.status === 'active';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user