Ejemplo n.º 1
0
        public SamlAttribute(System.IdentityModel.Tokens.SamlAttribute attribute)
        {
            ClaimType = attribute.Name;
            Value     = attribute.AttributeValues[0];
            ValueType = "string";

            SubjectName = attribute.Namespace;
        }
Ejemplo n.º 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);
        }