Skip to main content

foundation-comms.credentialmanager

Home > @genesislcap/foundation-comms > CredentialManager

CredentialManager interface

Represents a system for managing user credentials and authentication tokens.

Signature:

export interface CredentialManager 

Methods

Method

Description

createBasicCredentials(inputs)

Creates a set of basic authentication credentials using the specified input data.

createRefreshCredentials(inputs)

Creates a set of refresh authentication credentials using the specified input data.

createSSOCredentials(inputs)

Creates a set of SSO authentication credentials using the specified input data.

getCredentials(options)

Retrieves stored credentials.

getCredentialsFromContainer(options)

Retrieves credential data from the browser's credential manager.

getCredentialsFromCookie()

Retrieves credential data from a browser cookie.

getMFAToken()

Retrieves the current MFA token, if any.

getRefreshToken()

Retrieves the current refresh token, if any.

getSSOToken()

Retrieves the current SSO token, if any.

getUsername()

Retrieves the current username, if any.

normaliseLegacyCredentialData(data, cookie)

Normalise legacy credential data.

preventSilentAccess()

Prevents silent access by requiring the user to authenticate before making API requests.

removeAll()

Removes all user crendentials data.

removeCookie()

Removes the user's cookie.

removeMFAToken()

Removes the current MFA token, if any.

removeRefreshToken()

Removes the current refresh token, if any.

removeSSOToken()

Removes the current SSO token, if any.

removeUsername()

Removes the current username, if any.

storeCredentials(data)

Stores user credentials securely.

storeCredentialsInContainer(data)

Stores the specified credential data in the browser's credential manager.

storeCredentialsInCookie(data)

Stores the specified credential data in a browser cookie.

validateBasicCredentials(credentials)

Validates the specified set of basic authentication credentials.

validateRefreshCredentials(credentials)

Validates the specified set of refresh authentication credentials.

validateSSOCredentials(credentials)

Validates the specified set of SSO authentication credentials.

validateUserCredentialData(data, ensurePassword)

Validate user credential data returned from the container or a cookie.