projects/core/src/auth/user-auth/models/auth-token.model.ts
Structure of token used by the OAuth lib and across UserAuthModule
.
Properties |
|
access_token |
access_token:
|
Type : string
|
Token used for |
access_token_stored_at |
access_token_stored_at:
|
Type : string
|
Time when |
expires_at |
expires_at:
|
Type : string
|
Optional |
Time when |
granted_scopes |
granted_scopes:
|
Type : string[]
|
Optional |
Scopes granted by the OAuth server. |
refresh_token |
refresh_token:
|
Type : string
|
Optional |
Token to refresh the |
token_type |
token_type:
|
Type : string
|
Optional |
Type of the |
export interface AuthToken {
/**
* Token used for `Authorization` header.
*/
access_token: string;
/**
* Token to refresh the `access_token` when it expires.
*/
refresh_token?: string;
/**
* Time when `access_token` expires.
*/
expires_at?: string;
/**
* Scopes granted by the OAuth server.
*/
granted_scopes?: string[];
/**
* Time when `access_token` was fetched from OAuth server and saved.
*/
access_token_stored_at: string;
/**
* Type of the `access_token`. Most often `Bearer`.
*/
token_type?: string;
}