import EphemeralStore from 'ember-simple-auth/session-stores/ephemeral';

Session store that persists data in memory and thus is not actually persistent. It does also not synchronize the session's state across multiple tabs or windows as those cannot share memory. This store is mainly useful for testing and will automatically be used when running tests.

Methods

source public

clear( ) Ember.RSVP.Promise

Overrides: clear of BaseStore.

Clears the store.

Returns

Ember.RSVP.Promise

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

source public

persist(data) Ember.RSVP.Promise

Overrides: persist of BaseStore.

Persists the data. This replaces all currently stored data.

Arguments

data: Object

The data to persist

Returns

Ember.RSVP.Promise

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

source public

restore( ) Ember.RSVP.Promise

Overrides: restore of BaseStore.

Returns all data currently stored as a plain object.

Returns

Ember.RSVP.Promise

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

Events

source

sessionDataUpdated

Inherited from: sessionDataUpdated of BaseStore.

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 restore method and handles the result of that invocation accordingly.

Arguments

data: Object

The updated session data