UNPKG

lbx-jwt

Version:

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

23 lines (22 loc) 465 B
import { UserProfile, securityId } from '@loopback/security'; /** * A User Profile type to provide more type safety. */ export class BaseUserProfile<RoleType extends string> implements UserProfile { /** * The id of the user. */ [securityId]: string; /** * The id of the user. */ id: string; /** * The roles of the user. */ roles: RoleType[]; /** * The email of the user. */ email: string; }