Class

BaseStore

BaseStore()

Constructor

# new BaseStore()

The base class for all session stores. This serves as a starting point for implementing custom session stores and must not be used directly.

Session Stores persist the session's state so that it survives a page reload and is synchronized across multiple tabs or windows of the same application.

View Source session-stores/base.js, line 5

Extends

  • Ember.Object

Methods

# static clear() → {Ember.RSVP.Promise}

Clears the store.

`BaseStores`'s implementation always returns a rejecting promise. __This
method must be overridden in subclasses__.

View Source session-stores/base.js, line 62

A promise that resolves when the store has been cleared successfully and rejects otherwise.

Ember.RSVP.Promise

# static persist(data) → {Ember.RSVP.Promise}

Persists the data. This replaces all currently stored data.

`BaseStores`'s implementation always returns a rejecting promise. __This
method must be overridden in subclasses__.
Parameters:
Name Type Description
data Object

The data to persist

View Source session-stores/base.js, line 31

A promise that resolves when the data has successfully been persisted and rejects otherwise.

Ember.RSVP.Promise

# static restore() → {Ember.RSVP.Promise}

Returns all data currently stored as a plain object.

`BaseStores`'s implementation always returns a rejecting promise. __This
method must be overridden in subclasses__.

View Source session-stores/base.js, line 47

A promise that resolves with the data currently persisted in the store when the data has been restored successfully and rejects otherwise.

Ember.RSVP.Promise

Events

# sessionDataUpdated

Triggered when the session store's data changes due to an external event, e.g., from another tab or window of the same application. The session handles that event, passes the updated data to its authenticator's BaseAuthenticator.restore method and handles the result of that invocation accordingly.

Parameters:
Name Type Description
data Object

The updated session data

View Source session-stores/base.js, line 18