OAuth2Token
@auvious/common / Exports / OAuth2Token
Class: OAuth2Token
Implements
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new OAuth2Token(client
, json
)
Parameters
Name | Type |
---|---|
client | OAuth2Client |
json | any |
Properties
_client
• Private
_client: OAuth2Client
accessToken
• accessToken: string
Implementation of
createdAt
• createdAt: Date
Implementation of
expiresAt
• expiresAt: Date
Implementation of
expiresIn
• expiresIn: number
Implementation of
isGuest
• isGuest: boolean
Implementation of
refreshToken
• refreshToken: string
Implementation of
scope
• scope: string
Implementation of
type
• type: string
Implementation of
userId
• userId: string
Implementation of
Accessors
bearer
• get
bearer(): string
Returns
string
Implementation of
isExpired
• get
isExpired(): boolean
Returns
boolean
Implementation of
Methods
getValueFromJwtToken
▸ Private
getValueFromJwtToken(token
, field
): any
Parameters
Name | Type |
---|---|
token | string |
field | string |
Returns
any
importJSON
▸ importJSON(json
): void
Parameters
Name | Type |
---|---|
json | any |
Returns
void
Implementation of
refresh
▸ refresh(): Promise
<IOAuth2Token
>
Returns
Promise
<IOAuth2Token
>
Implementation of
toJSON
▸ toJSON(): any
Returns
any
Implementation of
toJSONStringified
▸ toJSONStringified(): string
Returns
string