public override SecurityToken ReadToken(string tokenString)
        {
            // unbase64 header if necessary
            if (HeaderEncoding.IsBase64Encoded(tokenString))
            {
                tokenString = HeaderEncoding.DecodeBase64(tokenString);
            }

            return(ReadToken(new XmlTextReader(new StringReader(tokenString))));
        }
Ejemplo n.º 2
0
        public override SecurityToken ReadToken(string jwtEncodedString)
        {
            // unbase64 header if necessary
            if (HeaderEncoding.IsBase64Encoded(jwtEncodedString))
            {
                jwtEncodedString = HeaderEncoding.DecodeBase64(jwtEncodedString);
            }

            if (jwtEncodedString.StartsWith("<"))
            {
                return(base.ReadToken(new XmlTextReader(new StringReader(jwtEncodedString))));
            }

            return(base.ReadToken(jwtEncodedString));
        }
Ejemplo n.º 3
0
        public override SecurityToken ReadToken(string tokenString)
        {
            // unbase64 header if necessary
            if (HeaderEncoding.IsBase64Encoded(tokenString))
            {
                tokenString = HeaderEncoding.DecodeBase64(tokenString);
            }

            // check containing collection (mainly useful for chained EncryptedSecurityTokenHandler)
            if (ContainingCollection != null)
            {
                return(ContainingCollection.ReadToken(new XmlTextReader(new StringReader(tokenString))));
            }
            else
            {
                return(ReadToken(new XmlTextReader(new StringReader(tokenString))));
            }
        }