@adonisjs/auth
Version:
Official authentication provider for Adonis framework
24 lines (23 loc) • 648 B
TypeScript
import { DateTime } from 'luxon';
import { ProviderTokenContract } from '@ioc:Adonis/Addons/Auth';
/**
* Token returned and accepted by the token providers
*/
export declare class ProviderToken implements ProviderTokenContract {
name: string;
tokenHash: string;
userId: string | number;
type: string;
/**
* Expiry date
*/
expiresAt?: DateTime;
/**
* All other token details
*/
meta?: any;
constructor(name: string, // Name associated with the token
tokenHash: string, // The hash to persist
userId: string | number, // The user for which the token is generated
type: string);
}