View Source
Class ClaimsPrincipalExtensions
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 |
| IPrincipal |
user |
|
Returns
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 |
| IPrincipal |
user |
|
| DateTimeOffset |
now |
|
Returns
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 |
| IPrincipal |
principal |
|
Returns
| Type |
Description |
| ClaimsIdentity |
|
View Source
IsBackOfficeAuthenticationType(ClaimsIdentity?)
Declaration
public static bool IsBackOfficeAuthenticationType(this ClaimsIdentity? claimsIdentity)
Parameters
| Type |
Name |
Description |
| ClaimsIdentity |
claimsIdentity |
|
Returns