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
text/typescript
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.
*/
[]: string;
/**
* The id of the user.
*/
id: string;
/**
* The roles of the user.
*/
roles: RoleType[];
/**
* The email of the user.
*/
email: string;
}