IdentityExtensions.Get Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

Get(ClaimsIdentity, String[])

Get the first claim with any of the specified type(s), otherwise null.

public static Claim Get(this ClaimsIdentity identity, params string[] claimTypes)

Parameters

identity
System.Security.Claims.ClaimsIdentity

A claims-based identity.

claimTypes
System.String[]

A list of claim types to check, e.g. ["sub", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"].

Returns

System.Security.Claims.Claim