Home Reference Source Test Repository
import AuthorizationStore from '@hoist/oauth-connector/src/authorisation_store.js'
public interface | source

AuthorizationStore

Member Summary

Public Members
public get
the query params the user is currently showing

Method Summary

Public Methods
public
removes any value saved against the specified key permanently
public
mark the current authorization flow as complete i.e.
public

get(key: string): object

gets a value saved against the specified key
public
redirect the user to the specified uri the user is no longer present after this call so should only happen at the end of a flow
public

set(key: string, value: object): Promise

sets and saves a value against the store

Public Members

public get query: object source

the query params the user is currently showing

Public Methods

public delete(key: string): Promise source

removes any value saved against the specified key permanently

Params:

NameTypeAttributeDescription
key string

the key the value is saved against

Return:

Promise

a promise to have deleted the value from the store

public done(): undefined source

mark the current authorization flow as complete i.e. after having swapped all access tokens and request tokens

Return:

undefined

public get(key: string): object source

gets a value saved against the specified key

Params:

NameTypeAttributeDescription
key string

the key the value is saved against

Return:

object

the value at the specified key or null

public redirect(uri: string): undefined source

redirect the user to the specified uri the user is no longer present after this call so should only happen at the end of a flow

Params:

NameTypeAttributeDescription
uri string

the uri to redirect the user to

Return:

undefined

public set(key: string, value: object): Promise source

sets and saves a value against the store

Params:

NameTypeAttributeDescription
key string

the key to store the value against

value object

the value to store

Return:

Promise

a promise to have saved the value