Class

WebauthnState

WebauthnState()

A class that manages WebAuthn credentials via local storage.
Constructor

# new WebauthnState()

View Source lib/state/WebauthnState.ts, line 10

Extends

Members

LocalStorage

# protected ls

Inherited From:

View Source lib/state/State.ts, line 24

Methods

# addCredential(userID, credentialID) → {WebauthnState}

Adds the credential to the list of known credentials.
Parameters:
Name Type Description
userID string The UUID of the user.
credentialID string The WebAuthn credential ID.

View Source lib/state/WebauthnState.ts, line 111

# getCredentials(userID) → {Array.<string>}

Gets the list of known credentials on the current browser.
Parameters:
Name Type Description
userID string The UUID of the user.

View Source lib/state/WebauthnState.ts, line 102

Array.<string>

# protected getUserState(userID) → {LocalStorageUser}

Gets the state of the specified user.
Parameters:
Name Type Description
userID string The UUID of the user.
Overrides:

View Source lib/state/UserState.ts, line 26

# matchCredentials(userID, match) → {Array.<Credential>}

Returns the intersection between the specified list of credentials and the known credentials stored in the local storage.
Parameters:
Name Type Description
userID string The UUID of the user.
match Array.<Credential> A list of credential IDs to be matched against the local storage.

View Source lib/state/WebauthnState.ts, line 121

Array.<Credential>

# read() → {WebauthnState}

Reads the current state.
Overrides:

View Source lib/state/WebauthnState.ts, line 94

# write() → {State}

Encodes and writes the data to the local storage.
Inherited From:

View Source lib/state/State.ts, line 51

State