Interface ISessionStore<TSessionToken>
Represents the store that keeps the records of sessions. Session handling resolves the store from a new service scope for each operation, so the store can take scoped services such as a database context through dependency injection.
Namespace: Singulink.Net.Http.Api.Service
Assembly: Singulink.Net.Http.Api.Service.dll
Syntax
public interface ISessionStore<TSessionToken> where TSessionToken : class, ISessionToken
Type Parameters
| Name | Description |
|---|---|
| TSessionToken | The session token type. |
Methods
| Name | Description |
|---|---|
| GetSessionAsync(TSessionToken, CancellationToken) | Gets the session that the specified session token belongs to, or null to end the session. |
| InvalidateSessionAsync(TSessionToken, CancellationToken) | Ends the session that the specified session token belongs to. |
| TryRefreshSessionAsync(TSessionToken, SessionRecord, int, CancellationToken) | Updates the session that the specified session token belongs to with the values of |