HTTP API Toolkit HTTP API Toolkit
HTTP API Toolkit HTTP API Toolkit
DocFX + Singulink = ♥

Search Results for

    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 refreshedSession, if its stored generation is still expectedGeneration. Returns true if the session was updated, or false if it no longer exists or its generation has changed.

    © Singulink. All rights reserved.