Skip to main content

foundation-comms.session

Home > @genesislcap/foundation-comms > Session

Session interface

Represents a session storage and its capabilities. Provides methods to set and get items from the specified storage.

Signature:

export interface Session 

Properties

Property

Modifiers

Type

Description

returnUrl

string

The return URL for the session.

Methods

Method

Description

captureReturnUrl()

Captures the return URL for the session.

deleteUserFromSessionStorage()

Deletes the user from the session storage.

getItem(key, storage)

Returns the value of the specified item in the specified storage.

getLocalStorageItem(key)

Returns the value of the item with the specified key from the local storage.

getSessionStorageItem(key)

Returns the value of the item with the specified key from the session storage.

removeItem(key, storage)

Removes the item with the specified key from the specified storage.

removeLocalStorageItem(key)

Removes the item with the specified key from the local storage.

removeSessionStorageItem(key)

Removes the item with the specified key from the session storage.

setAuthResult(info)

Sets the authentication result for the session.

setItem(key, value, storage)

Sets an item in the specified storage with the specified key and value.

setLocalStorageItem(key, value)

Sets an item in the local storage with the specified key and value.

setSessionStorageItem(key, value)

Sets an item in the session storage with the specified key and value.

setStorageKeyPrefix(prefix)

Sets the storage key prefix for the session.