import { FM3RefreshOption, FidoMds3Config, FM3MetadataBLOBPayloadEntry } from './type'; import MdsPayloadEntry from './models/mdsPayloadEntry'; /** * Client class finds authenticator information from metadata service by authenticator model identifier(AAGUID etc.). * */ declare class Client { private config; updatedAt?: Date; /** * Legal agreement for using the MDS. */ legalHeader?: string; /** * Serial number of this UAF Metadata BLOB Payload. */ no?: number; /** * Date when the next update is expected for entries in this instance. */ nextUpdateAt?: Date; /** * Array of MetadataBLOBPayloadEntry object which is each authenticator model info. */ entries?: FM3MetadataBLOBPayloadEntry[]; /** * Client class constructor. * This constructor does not load authenticator model infos yet. * Please compare to create method. * * @param config */ constructor(config: FidoMds3Config); /** * Create the instance of client class and load authenticator model infos. * Please compare to constructor. * * @param config * @returns Instance of client class */ static create(config: FidoMds3Config): Promise; /** * Updates authenticator model infos. */ refresh(): Promise; private format; /** * Load authenticator infos to this instance, following config. * */ private load; private judgeRefresh; /** * Find FIDO2 authenticator info by AAGUID. * * Note: FIDO UAF authenticators support AAID, but they don’t support AAGUID.
* Note: FIDO2 authenticators support AAGUID, but they don’t support AAID.
* Note: FIDO U2F authenticators do not support AAID nor AAGUID, but they use attestation certificates dedicated to a single authenticator model.
* * @param aaguid FIDO2 authenticator AAGUID * @param refresh if true force to fetch Metadata BLOB, if false depends on update date or follows FM3RefreshOption * @returns Metadata entry if not find return null */ findByAAGUID(aaguid: string, refresh?: boolean | FM3RefreshOption): Promise; /** * Find FIDO2 authenticator info class by AAGUID and return in model class . * * Note: FIDO UAF authenticators support AAID, but they don’t support AAGUID.
* Note: FIDO2 authenticators support AAGUID, but they don’t support AAID.
* Note: FIDO U2F authenticators do not support AAID nor AAGUID, but they use attestation certificates dedicated to a single authenticator model.
* * @param aaguid FIDO2 authenticator AAGUID * @param refresh if true force to fetch Metadata BLOB, if false depends on update date or follows FM3RefreshOption * @returns Metadata entry model class if not find return null */ findModelByAAGUID(aaguid: string, refresh?: boolean | FM3RefreshOption): Promise; /** * Find FIDO UAF authenticator info by AAID. * * Note: FIDO UAF authenticators support AAID, but they don’t support AAGUID.
* Note: FIDO2 authenticators support AAGUID, but they don’t support AAID.
* Note: FIDO U2F authenticators do not support AAID nor AAGUID, but they use attestation certificates dedicated to a single authenticator model.
* * @param aaid FIDO UAF authenticator AAID * @param refresh if true force to fetch Metadata BLOB, if false depends on update date or follows FM3RefreshOption * @returns Metadata entry if not find return null */ findByAAID(aaid: string, refresh?: boolean | FM3RefreshOption): Promise; /** * Find FIDO UAF authenticator info by AAID and return in model class. * * Note: FIDO UAF authenticators support AAID, but they don’t support AAGUID.
* Note: FIDO2 authenticators support AAGUID, but they don’t support AAID.
* Note: FIDO U2F authenticators do not support AAID nor AAGUID, but they use attestation certificates dedicated to a single authenticator model.
* * @param aaid FIDO UAF authenticator AAID * @param refresh if true force to fetch Metadata BLOB, if false depends on update date or follows FM3RefreshOption * @returns Metadata entry model class if not find return null */ findModelByAAID(aaid: string, refresh?: boolean | FM3RefreshOption): Promise; /** * Find FIDO U2F authenticator info by AttestationCertificateKeyIdentifier. * * Note: FIDO UAF authenticators support AAID, but they don’t support AAGUID.
* Note: FIDO2 authenticators support AAGUID, but they don’t support AAID.
* Note: FIDO U2F authenticators do not support AAID nor AAGUID, but they use attestation certificates dedicated to a single authenticator model.
* * @param attestationCertificateKeyIdentifier FIDO U2F authenticator AttestationCertificateKeyIdentifier * @param refresh if true force to fetch Metadata BLOB, if false depends on update date or follows FM3RefreshOption * @returns Metadata entry if not find return null */ findByAttestationCertificateKeyIdentifier(attestationCertificateKeyIdentifier: string, refresh?: boolean | FM3RefreshOption): Promise; /** * Find FIDO U2F authenticator info by AttestationCertificateKeyIdentifier and return in model class . * * Note: FIDO UAF authenticators support AAID, but they don’t support AAGUID.
* Note: FIDO2 authenticators support AAGUID, but they don’t support AAID.
* Note: FIDO U2F authenticators do not support AAID nor AAGUID, but they use attestation certificates dedicated to a single authenticator model.
* * @param attestationCertificateKeyIdentifier FIDO U2F authenticator AttestationCertificateKeyIdentifier * @param refresh if true force to fetch Metadata BLOB, if false depends on update date or follows FM3RefreshOption * @returns Metadata entry model class if not find return null */ findModelByAttestationCertificateKeyIdentifier(attestationCertificateKeyIdentifier: string, refresh?: boolean | FM3RefreshOption): Promise; /** * Find FIDO(FIDO2, FIDO UAF and FIDO U2F) authenticator info. * * @param identifier AAGUID, AAID or AttestationCertificateKeyIdentifier * @param refresh if true force to fetch Metadata BLOB, if false depends on update date or follows FM3RefreshOption * @returns Metadata entry if not find return null */ findMetadata(identifier: string, refresh?: boolean | FM3RefreshOption): Promise; /** * Find FIDO(FIDO2, FIDO UAF and FIDO U2F) authenticator info and return in model class . * * @param identifier AAGUID, AAID or AttestationCertificateKeyIdentifier * @param refresh if true force to fetch Metadata BLOB, if false depends on update date or follows FM3RefreshOption * @returns Metadata entry model class if not find return null */ findMetadataModel(identifier: string, refresh?: boolean | FM3RefreshOption): Promise; } export default Client;