lbx-jwt
Version:
Provides JWT authentication for loopback applications. Includes storing roles inside tokens and handling refreshing. Built-in reuse detection.
43 lines (42 loc) • 1.01 kB
TypeScript
import { Entity } from '@loopback/repository';
/**
* Data about refresh tokens.
*/
export declare class RefreshToken extends Entity {
/**
* The id of the refresh token.
*/
id: string;
/**
* The id of the user to which this refresh token belongs.
*/
baseUserId: string;
/**
* The actual token value.
*/
tokenValue: string;
/**
* The id of the token family.
* Is needed for the automatic reuse detection.
*/
familyId: string;
/**
* Whether or not the refresh token is blacklisted.
* Is needed for the automatic reuse detection.
*/
blacklisted: boolean;
/**
* The expiration date of the refresh token.
*/
expirationDate: Date;
constructor(data?: Partial<RefreshToken>);
}
/**
* Properties of the entity relations.
*/
export interface RefreshTokenRelations {
}
/**
* The entity with its relation properties.
*/
export type RefreshTokenWithRelations = RefreshToken & RefreshTokenRelations;