Interface ISessionStoreContext<TSessionToken, TSessionData>
Represents a session data storage context used for managing session tokens and associated data.
Inherited Members
Namespace: Singulink.Net.Http.Api.Service
Assembly: Singulink.Net.Http.Api.Service.dll
Syntax
public interface ISessionStoreContext<TSessionToken, TSessionData> : IAsyncDisposable where TSessionToken : class, ISessionToken where TSessionData : class, ISessionData
Type Parameters
| Name | Description |
|---|---|
| TSessionToken | The session token type. |
| TSessionData | The session storage entry type. |
Methods
| Name | Description |
|---|---|
| CreateTokenAsync(TSessionToken, ISessionTokenRefreshInfo, bool) | Creates a new session token for the session represented by the previous token with the provided refresh info applied. |
| GetSessionDataAsync(TSessionToken) | Gets the session data associated with the specified session token. |
| InvalidateSessionAsync(TSessionToken) | Signs out of the session associated with the specified session token. |
| IsTokenStaleAsync(TSessionToken) | Determines whether the information contained in the specified session token is stale, i.e. the data it was created from has changed since it was created. Implementations typically compare a security stamp or version captured in the token against the latest value in the data store. This is called once per request when the token is due for a refresh or the request forces session validation. |
| UpdateSessionAsync(TSessionData) | Persists updated session data to the data store. |