Skip to main content

Reference / Modules / client / AccountTokens

Class: AccountTokens

client.AccountTokens

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new AccountTokens(api, initialState): AccountTokens

Parameters

NameType
apiLogionNodeApiClass
initialStateRecord<string, Token>

Returns

AccountTokens

Defined in

packages/client/src/AuthenticationClient.ts:130

Properties

api

Private api: LogionNodeApiClass

Defined in

packages/client/src/AuthenticationClient.ts:135


store

Private store: Record<string, Token>

Defined in

packages/client/src/AuthenticationClient.ts:137

Accessors

accounts

get accounts(): ValidAccountId[]

Returns

ValidAccountId[]

Defined in

packages/client/src/AuthenticationClient.ts:151


length

get length(): number

Returns

number

Defined in

packages/client/src/AuthenticationClient.ts:181

Methods

cleanUp

cleanUp(now): AccountTokens

Parameters

NameType
nowDateTime

Returns

AccountTokens

Defined in

packages/client/src/AuthenticationClient.ts:155


earliestExpiration

earliestExpiration(): undefined | DateTime

Returns

undefined | DateTime

Defined in

packages/client/src/AuthenticationClient.ts:197


equals

equals(other): boolean

Parameters

NameType
otherAccountTokens

Returns

boolean

Defined in

packages/client/src/AuthenticationClient.ts:166


get

get(account?): undefined | Token

Parameters

NameType
account?ValidAccountId

Returns

undefined | Token

Defined in

packages/client/src/AuthenticationClient.ts:139


isAuthenticated

isAuthenticated(now, account): boolean

Parameters

NameType
nowDateTime
accountundefined | ValidAccountId

Returns

boolean

Defined in

packages/client/src/AuthenticationClient.ts:185


merge

merge(tokens): AccountTokens

Parameters

NameType
tokensAccountTokens

Returns

AccountTokens

Defined in

packages/client/src/AuthenticationClient.ts:143