예제 #1
0
        public SamlAttribute(System.IdentityModel.Tokens.SamlAttribute attribute)
        {
            ClaimType = attribute.Name;
            Value     = attribute.AttributeValues[0];
            ValueType = "string";

            SubjectName = attribute.Namespace;
        }
예제 #2
0
        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);
        }