UNPKG

lbx-jwt

Version:

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

49 lines (48 loc) 1.36 kB
import { Entity } from '@loopback/repository'; import { Base64UrlString } from '../encapsulation/webauthn.utilities'; /** * Biometric credentials of an user. */ export declare class BiometricCredentials extends Entity { /** * The id of the credentials. */ id: string; /** * The public key as a base64 string. */ publicKey: Base64UrlString; /** * The webauthn credential id as a base64 string. */ credentialId: Base64UrlString; /** * The webauthn challenge as a base64 string. */ challenge: Base64UrlString; /** * How many times the credentials have been used for this website. * Is used internally to prohibit replay attacks. */ counter: number; /** * The date at which the biometric credential expires. * This is only used for registration purposes, * to clean up old registrations that are pending. */ expirationDate: Date | undefined; /** * The user that this credentials belong to. */ baseUserId: string; constructor(data?: Partial<BiometricCredentials>); } /** * Properties of the entity relations. */ export interface BiometricCredentialsRelations { } /** * The entity with its relation properties. */ export type BiometricCredentialsWithRelations = BiometricCredentials & BiometricCredentialsRelations;