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

Search Results for

    Class HttpSessionContext<TSessionToken>

    Provides an abstraction for handling user sessions and tokens in an HTTP context.

    Inheritance
    object
    SessionContext<TSessionToken>
    HttpSessionContext<TSessionToken>
    HttpSessionContext<TSessionToken, TSessionData>
    Implements
    IBindableFromHttpContext<SessionContext<TSessionToken>>
    IBindableFromHttpContext<HttpSessionContext<TSessionToken>>
    Inherited Members
    SessionContext<TSessionToken>.GetRequiredTokenAsync(SessionAccessOptions)
    SessionContext<TSessionToken>.GetTokenAsync(SessionAccessOptions)
    SessionContext<TSessionToken>.SetToken(TSessionToken)
    SessionContext<TSessionToken>.SignInAsync(bool, Func<SignInInfo, Task<TSessionToken>>)
    SessionContext<TSessionToken>.SignOutAsync()
    SessionContext<TSessionToken>.ClearToken()
    SessionContext<TSessionToken>.IBindableFromHttpContext<SessionContext<TSessionToken>>.BindAsync(HttpContext, ParameterInfo)
    Namespace: Singulink.Net.Http.Api.Service
    Assembly: Singulink.Net.Http.Api.Service.dll
    Syntax
    public abstract class HttpSessionContext<TSessionToken> : SessionContext<TSessionToken>, IBindableFromHttpContext<SessionContext<TSessionToken>>, IBindableFromHttpContext<HttpSessionContext<TSessionToken>> where TSessionToken : class, ISessionToken
    Type Parameters
    Name Description
    TSessionToken

    Constructors

    Name Description
    HttpSessionContext(IOriginValidator)

    Initializes a new instance of the HttpSessionContext<TSessionToken> class.

    Properties

    Name Description
    Device

    Gets the device information from the User-Agent header in the request. Returns a parsed device platform, name and version if it could be identified, otherwise returns the raw user agent string.

    HttpContext

    Gets the HTTP context for the current request.

    IpAddress

    Gets the IP address of the current request. If the IP address cannot be determined, returns null.

    OriginValidator

    Gets the origin validator used to validate request origins.

    Methods

    Name Description
    IsRequestOriginAllowed()

    Validates the current request origin against allowed origins. If the request contains an origin identifier, it must match one of the allowed origins.

    Explicit Interface Implementations

    Name Description
    IBindableFromHttpContext<HttpSessionContext<TSessionToken>>.BindAsync(HttpContext, ParameterInfo)

    Binds the SessionContext<TSessionToken> parameter value.

    © Singulink. All rights reserved.