Home Reference Source
import AuthContext from '@token-io/core/src/http/AuthContext.js'
public class | source

AuthContext

Handles the auth context when using access tokens.

Constructor Summary

Public Constructor
public

Creates an AuthContext object

Member Summary

Public Members
public set

Sets the auth context to indicate that the next api call would have been initiated by the customer.

public get

Gets the customer initiated request flag.

public get

customerTrackingMetadata: CustomerTrackingMetadata: *

Gets the customer tracking metadata

public set

customerTrackingMetadata(value: CustomerTrackingMetadata): *

Sets the customer tracking metadata

public set

keyLevel(keyLevel: string): *

Sets the key level to be used to sign the auth header

public get

Gets the key level

public get

Gets misc headers

public set

Sets misc headers

public set

onBehalfOf(onBehalfOf: string): *

Sets the auth context to act on behalf of another member

public get

Gets the currently active memberId

Private Members
private
private
private
private
private

Public Constructors

public constructor() source

Creates an AuthContext object

Public Members

public set customerInitiated(flag: boolean): * source

Sets the auth context to indicate that the next api call would have been initiated by the customer.

public get customerInitiated: boolean: * source

Gets the customer initiated request flag.

Return:

boolean

true if request initiated by customer

public get customerTrackingMetadata: CustomerTrackingMetadata: * source

Gets the customer tracking metadata

Return:

CustomerTrackingMetadata

public set customerTrackingMetadata(value: CustomerTrackingMetadata): * source

Sets the customer tracking metadata

public set keyLevel(keyLevel: string): * source

Sets the key level to be used to sign the auth header

public get keyLevel: string: * source

Gets the key level

Return:

string

key level being used

public get miscHeaders: MiscHeaders: * source

Gets misc headers

Return:

MiscHeaders

public set miscHeaders(value: MiscHeaders): * source

Sets misc headers

public set onBehalfOf(onBehalfOf: string): * source

Sets the auth context to act on behalf of another member

public get onBehalfOf: string: * source

Gets the currently active memberId

Return:

string

accessTokenId being used

Private Members

private _customerInitiated: boolean source

private _customerTrackingMetadata: {} source

private _keyLevel: * source

private _miscHeaders: {} source

private _onBehalfOf: * source