UNPKG

lbx-jwt

Version:

Provides JWT authentication for loopback applications. Includes storing roles inside tokens and handling refreshing. Built-in reuse detection.

67 lines (66 loc) 2.16 kB
import { AuthenticatorExtensionsAuthenticatorOutputs } from './authenticator-extensions-authenticator-outputs.model'; import { AttestationFormat, Base64UrlString, CredentialDeviceType } from '../../../encapsulation/webauthn.utilities'; /** * Information about the registration. */ export declare class RegistrationInfo { /** * Type of attestation. */ fmt: AttestationFormat; /** * The number of times the authenticator reported it has been used. * **Should be kept in a DB for later reference to help prevent replay attacks!**. */ counter: number; /** * Authenticator's Attestation GUID indicating the type of the * authenticator. */ aaguid: string; /** * The credential's credential ID for the public key above. */ credentialID: Base64UrlString; /** * The credential's public key as a base64 string. */ credentialPublicKey: Base64UrlString; /** * The type of the credential returned by the browser. */ credentialType: PublicKeyCredentialType; /** * The `response.attestationObject` returned by the authenticator as a base64 string. */ attestationObject: Base64UrlString; /** * Whether the user was uniquely identified during attestation. */ userVerified: boolean; /** * Whether this is a single-device or multi-device * credential. **Should be kept in a DB for later reference!**. */ credentialDeviceType: CredentialDeviceType; /** * Whether or not the multi-device credential has been * backed up. Always `false` for single-device credentials. **Should be kept in a DB for later * reference!**. */ credentialBackedUp: boolean; /** * The origin of the website that the registration occurred on. */ origin: string; /** * The RP ID that the registration occurred on, if one or more were * specified in the registration options. */ rpID?: string; /** * The authenticator extensions returned * by the browser. */ authenticatorExtensionResults?: AuthenticatorExtensionsAuthenticatorOutputs; }