public SamlAttribute(System.IdentityModel.Tokens.SamlAttribute attribute) { ClaimType = attribute.Name; Value = attribute.AttributeValues[0]; ValueType = "string"; SubjectName = attribute.Namespace; }
public static IEnumerable <SamlAttribute> SamlAttributeFromToken(System.IdentityModel.Tokens.SamlAttribute attribute) { var claims = attribute.AttributeValues.Select(value => new SamlAttribute() { ClaimType = attribute.Name, Value = value, ValueType = "string", SubjectName = attribute.Namespace }).ToList(); return(claims); }