IdentityExtensions Class

 

Provides extension methods to get the user name or user ID from an identity.

Namespace:   Microsoft.AspNet.Identity
Assembly:  Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)

System.Object
  Microsoft.AspNet.Identity.IdentityExtensions

public static class IdentityExtensions

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticFindFirstValue(ClaimsIdentity, String)

Returns the claim value for the first claim with the specified type.

System_CAPS_pubmethodSystem_CAPS_staticGetUserId(IIdentity)

Returns the user ID using the UserIdClaimType.

System_CAPS_pubmethodSystem_CAPS_staticGetUserId<T>(IIdentity)

Return the user id using the UserIdClaimType

System_CAPS_pubmethodSystem_CAPS_staticGetUserName(IIdentity)

Returns the user name using the UserNameClaimType.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: