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

Search Results for

    Method GetRequiredTokenAsync

    GetRequiredTokenAsync(SessionAccessOptions)

    Gets the session token from the current request. If the user is not signed in, throws an UnauthorizedApiException.

    Declaration
    public override ValueTask<TSessionToken> GetRequiredTokenAsync(SessionAccessOptions sessionOptions = SessionAccessOptions.None)
    Parameters
    Type Name Description
    SessionAccessOptions sessionOptions

    Option flags for retrieving the session token.

    Returns
    Type Description
    ValueTask<TSessionToken>
    Overrides
    SessionContext<TSessionToken>.GetRequiredTokenAsync(SessionAccessOptions)
    Remarks
    The token is read from the request and validated against the session store at most once per request, and the result is cached for subsequent calls. After SetToken(TSessionToken) or ClearToken() is called, subsequent calls return the token that was set (or null).
    © Singulink. All rights reserved.