Class

SessionState

SessionState(options)

A class to read and write local storage contents regarding sessions.
Constructor

# new SessionState(options)

Parameters:
Name Type Description
options SessionStateOptions The options that can be used

View Source lib/state/session/SessionState.ts, line 11

Extends

Methods

# getAuthFlowCompleted() → {boolean}

Gets the authFlowCompleted indicator.

View Source lib/state/session/SessionState.ts, line 165

boolean

# getExpirationSeconds() → {number}

Gets the number of seconds until the active session is valid.

View Source lib/state/session/SessionState.ts, line 137

number

# getState() → {LocalStorageSession}

Gets the session state.

View Source lib/state/session/SessionState.ts, line 130

# getUserID() → {string}

Gets the user id.

View Source lib/state/session/SessionState.ts, line 151

string

# read() → {SessionState}

Reads the current state.
Overrides:

View Source lib/state/session/SessionState.ts, line 123

SessionState

# reset() → {SessionState}

Removes the session details.

View Source lib/state/session/SessionState.ts, line 180

SessionState

# setAuthFlowCompleted(completed) → {SessionState}

Sets the authFlowCompleted indicator.
Parameters:
Name Type Description
completed string The authFlowCompleted indicator.

View Source lib/state/session/SessionState.ts, line 173

SessionState

# setExpirationSeconds(seconds) → {SessionState}

Sets the number of seconds until the active session is valid.
Parameters:
Name Type Description
seconds number The number of seconds

View Source lib/state/session/SessionState.ts, line 145

SessionState

# setUserID(userID) → {SessionState}

Sets the user id.
Parameters:
Name Type Description
userID string The user id

View Source lib/state/session/SessionState.ts, line 159

SessionState

# write() → {State}

Encodes and writes the data to the local storage.
Overrides:

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

State