Bearbeiten

Freigeben über


ITokenCache interface

Token cache interface for the client, giving access to cache APIs

Methods

getAccountByHomeId(string)

Returns the signed in account matching homeAccountId

getAccountByLocalId(string)

Returns the signed in account matching localAccountId

getAllAccounts()

API that retrieves all accounts currently in cache to the user

removeAccount(AccountInfo)

API to remove a specific account and the relevant data from cache

Method Details

getAccountByHomeId(string)

Returns the signed in account matching homeAccountId

function getAccountByHomeId(homeAccountId: string): Promise<AccountInfo | null>

Parameters

homeAccountId

string

Returns

Promise<AccountInfo | null>

getAccountByLocalId(string)

Returns the signed in account matching localAccountId

function getAccountByLocalId(localAccountId: string): Promise<AccountInfo | null>

Parameters

localAccountId

string

Returns

Promise<AccountInfo | null>

getAllAccounts()

API that retrieves all accounts currently in cache to the user

function getAllAccounts(): Promise<AccountInfo[]>

Returns

Promise<AccountInfo[]>

removeAccount(AccountInfo)

API to remove a specific account and the relevant data from cache

function removeAccount(account: AccountInfo): Promise<void>

Parameters

account

AccountInfo

Returns

Promise<void>