Search Results for

    Show / Hide Table of Contents
    View Source

    Class ClaimsPrincipalExtensions

    Inheritance
    System.Object
    Namespace: Umbraco.Extensions
    Assembly: Umbraco.Core.dll
    Syntax
    public static class ClaimsPrincipalExtensions

    Methods

    View Source

    GetRemainingAuthSeconds(IPrincipal)

    Returns the remaining seconds on an auth ticket for the user based on the claim applied to the user durnig authentication

    Declaration
    public static double GetRemainingAuthSeconds(this IPrincipal user)
    Parameters
    Type Name Description
    System.Security.Principal.IPrincipal user
    Returns
    Type Description
    System.Double
    View Source

    GetRemainingAuthSeconds(IPrincipal, DateTimeOffset)

    Returns the remaining seconds on an auth ticket for the user based on the claim applied to the user durnig authentication

    Declaration
    public static double GetRemainingAuthSeconds(this IPrincipal user, DateTimeOffset now)
    Parameters
    Type Name Description
    System.Security.Principal.IPrincipal user
    DateTimeOffset now
    Returns
    Type Description
    System.Double
    View Source

    GetUmbracoIdentity(IPrincipal)

    This will return the current back office identity if the IPrincipal is the correct type and authenticated.

    Declaration
    public static ClaimsIdentity GetUmbracoIdentity(this IPrincipal principal)
    Parameters
    Type Name Description
    System.Security.Principal.IPrincipal principal
    Returns
    Type Description
    System.Security.Claims.ClaimsIdentity
    View Source

    IsBackOfficeAuthenticationType(ClaimsIdentity)

    Declaration
    public static bool IsBackOfficeAuthenticationType(this ClaimsIdentity claimsIdentity)
    Parameters
    Type Name Description
    System.Security.Claims.ClaimsIdentity claimsIdentity
    Returns
    Type Description
    System.Boolean
    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • GetRemainingAuthSeconds(IPrincipal)
      • GetRemainingAuthSeconds(IPrincipal, DateTimeOffset)
      • GetUmbracoIdentity(IPrincipal)
      • IsBackOfficeAuthenticationType(ClaimsIdentity)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX