31 lines
588 B
TypeScript
31 lines
588 B
TypeScript
import { IsInt, IsString } from 'class-validator';
|
|
|
|
/**
|
|
* Defines the repsonse auth.
|
|
*/
|
|
export class ResponseAuth {
|
|
/**
|
|
* The access_token - JWT shortterm access token.
|
|
*/
|
|
@IsString()
|
|
access_token: string;
|
|
|
|
/**
|
|
* The refresh_token - longterm refresh token (used for requesting new access tokens).
|
|
*/
|
|
@IsString()
|
|
refresh_token: string;
|
|
|
|
/**
|
|
* The unix timestamp for access the token's expiry.
|
|
*/
|
|
@IsInt()
|
|
access_token_expires_at: number;
|
|
|
|
/**
|
|
* The unix unix timestamp for the access token's expiry.
|
|
*/
|
|
@IsInt()
|
|
refresh_token_expires_at: number;
|
|
}
|