Skip to main content

OAuth2Token

@auvious/common / Exports / OAuth2Token

Class: OAuth2Token

Implements

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new OAuth2Token(client, json)

Parameters

NameType
clientOAuth2Client
jsonany

Properties

_client

Private _client: OAuth2Client


accessToken

accessToken: string

Implementation of

IOAuth2Token.accessToken


createdAt

createdAt: Date

Implementation of

IOAuth2Token.createdAt


expiresAt

expiresAt: Date

Implementation of

IOAuth2Token.expiresAt


expiresIn

expiresIn: number

Implementation of

IOAuth2Token.expiresIn


isGuest

isGuest: boolean

Implementation of

IOAuth2Token.isGuest


refreshToken

refreshToken: string

Implementation of

IOAuth2Token.refreshToken


scope

scope: string

Implementation of

IOAuth2Token.scope


type

type: string

Implementation of

IOAuth2Token.type


userId

userId: string

Implementation of

IOAuth2Token.userId

Accessors

bearer

get bearer(): string

Returns

string

Implementation of

IOAuth2Token.bearer


isExpired

get isExpired(): boolean

Returns

boolean

Implementation of

IOAuth2Token.isExpired

Methods

getValueFromJwtToken

Private getValueFromJwtToken(token, field): any

Parameters

NameType
tokenstring
fieldstring

Returns

any


importJSON

importJSON(json): void

Parameters

NameType
jsonany

Returns

void

Implementation of

IOAuth2Token.importJSON


refresh

refresh(): Promise<IOAuth2Token>

Returns

Promise<IOAuth2Token>

Implementation of

IOAuth2Token.refresh


toJSON

toJSON(): any

Returns

any

Implementation of

IOAuth2Token.toJSON


toJSONStringified

toJSONStringified(): string

Returns

string

Implementation of

IOAuth2Token.toJSONStringified