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

Search Results for

    Method GetSessionTokenAsync

    GetSessionTokenAsync<TSessionToken>(HubCallerContext, SessionAccessOptions)

    Gets the session token for the hub connection. If the user is not signed in, returns null.

    Declaration
    public static ValueTask<TSessionToken?> GetSessionTokenAsync<TSessionToken>(this HubCallerContext context, SessionAccessOptions sessionOptions = SessionAccessOptions.None) where TSessionToken : class, ISessionToken
    Parameters
    Type Name Description
    HubCallerContext context

    The hub caller context.

    SessionAccessOptions sessionOptions

    Option flags for retrieving the session token.

    Returns
    Type Description
    ValueTask<TSessionToken>
    Type Parameters
    Name Description
    TSessionToken
    Exceptions
    Type Condition
    InvalidOperationException

    The hub connection does not have an HTTP context.

    © Singulink. All rights reserved.