Search Results for

    Show / Hide Table of Contents
    View Source

    Class BackOfficeSessionIdValidator

    Used to validate a cookie against a user's session id

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Web.BackOffice.Security
    Assembly: Umbraco.Web.BackOffice.dll
    Syntax
    public class BackOfficeSessionIdValidator
    Remarks

    This uses another cookie to track the last checked time which is done for a few reasons: * We can't use the user's auth ticket to do this because we'd be re-issuing the auth ticket all of the time and it would never expire plus the auth ticket size is much larger than this small value * This will execute quite often (every minute per user) and in some cases there might be several requests that end up re-issuing the cookie so the cookie value should be small * We want to avoid the user lookup if it's not required so that will only happen when the time diff is great enough in the cookie

    This is a scoped/request based object.

    Constructors

    View Source

    BackOfficeSessionIdValidator(ISystemClock, IOptionsSnapshot<GlobalSettings>, IBackOfficeUserManager)

    Initializes a new instance of the BackOfficeSessionIdValidator class.

    Declaration
    public BackOfficeSessionIdValidator(ISystemClock systemClock, IOptionsSnapshot<GlobalSettings> globalSettings, IBackOfficeUserManager userManager)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Authentication.ISystemClock systemClock
    Microsoft.Extensions.Options.IOptionsSnapshot<GlobalSettings> globalSettings
    IBackOfficeUserManager userManager

    Fields

    View Source

    CookieName

    Declaration
    public const string CookieName = "UMB_UCONTEXT_C"
    Field Value
    Type Description
    System.String

    Methods

    View Source

    ValidateSessionAsync(TimeSpan, CookieValidatePrincipalContext)

    Declaration
    public async Task ValidateSessionAsync(TimeSpan validateInterval, CookieValidatePrincipalContext context)
    Parameters
    Type Name Description
    TimeSpan validateInterval
    Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext context
    Returns
    Type Description
    Task
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • BackOfficeSessionIdValidator(ISystemClock, IOptionsSnapshot<GlobalSettings>, IBackOfficeUserManager)
    • Fields
      • CookieName
    • Methods
      • ValidateSessionAsync(TimeSpan, CookieValidatePrincipalContext)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX