System.Security.Claims.ClaimsIdentity.FindAll C# (CSharp) Method

FindAll() public method

public FindAll ( string type ) : System.Collections.Generic.IEnumerable
type string
return System.Collections.Generic.IEnumerable
        public virtual System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> FindAll(string type) { throw null; }
        public virtual System.Security.Claims.Claim FindFirst(System.Predicate<System.Security.Claims.Claim> match) { throw null; }

Same methods

ClaimsIdentity::FindAll ( Predicate match ) : IEnumerable
ClaimsIdentity::FindAll ( string type ) : IEnumerable
ClaimsIdentity::FindAll ( System match ) : System.Collections.Generic.IEnumerable

Usage Example

コード例 #1
0
        public static async Task<List<string>> GetGroups(ClaimsIdentity claimsId)
        {
            if (claimsId.FindFirst("_claim_names") != null
                && (Json.Decode(claimsId.FindFirst("_claim_names").Value)).groups != null)
                return await GetGroupsFromGraphAPI(claimsId);

            return claimsId.FindAll("groups").Select(c => c.Value).ToList();
        }
All Usage Examples Of System.Security.Claims.ClaimsIdentity::FindAll