initial
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
export type TLoginStatus = 'loggedIn' | 'loggedOut' | 'invalidated' | 'not found' | 'transfer';
|
||||
export type TLoginAction = 'login' | 'logout' | 'manage';
|
||||
|
||||
export interface IJwt {
|
||||
id: string;
|
||||
blocked: boolean;
|
||||
data: {
|
||||
/**
|
||||
* the user id of the jwt
|
||||
*/
|
||||
userId: string;
|
||||
|
||||
/**
|
||||
* the latest point of
|
||||
*/
|
||||
validUntil: number;
|
||||
/**
|
||||
* hold off from refreshing before
|
||||
*/
|
||||
refreshFrom: number;
|
||||
/**
|
||||
* an interval in millis to recheck token invalidation
|
||||
*/
|
||||
refreshEvery: number;
|
||||
|
||||
/**
|
||||
* the refresh token to obtain a new jwt for a session
|
||||
*/
|
||||
refreshToken: string;
|
||||
|
||||
/**
|
||||
* just for looks/debugging
|
||||
*/
|
||||
justForLooks: {
|
||||
validUntilIsoString: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user