IdentityExtensions Class
Extensions making it easier to get the user name/user id claims off of an identity.
Inheritance Hierarchy
System.Object
Microsoft.AspNet.Identity.IdentityExtensions
Namespace: Microsoft.AspNet.Identity
Assembly: Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public NotInheritable Class IdentityExtensions
'Usage
public static class IdentityExtensions
[ExtensionAttribute]
public ref class IdentityExtensions abstract sealed
[<AbstractClassAttribute>]
[<SealedAttribute>]
type IdentityExtensions = class end
public final class IdentityExtensions
The IdentityExtensions type exposes the following members.
Methods
Name | Description | |
---|---|---|
FindFirstValue | Return the claim value for the first claim with the specified type if it exists, null otherwise. | |
GetUserId | Return the user id using the UserIdClaimType. | |
GetUserName | Return the user name using the UserNameClaimType. |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.