lbx-jwt
Version:
Provides JWT authentication for loopback applications. Includes storing roles inside tokens and handling refreshing. Built-in reuse detection.
30 lines (29 loc) • 562 B
text/typescript
import { model, Model, property } from '@loopback/repository';
/**
* The Credentials used in the login.
*/
@model()
export class LoginCredentials extends Model {
/**
* The email of the user.
*/
@property({
type: 'string',
required: true,
jsonSchema: {
format: 'email'
}
})
email: string;
/**
* The password of the user.
*/
@property({
type: 'string',
required: true,
jsonSchema: {
minLength: 12
}
})
password: string;
}