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))));
        }
예제 #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));
        }
예제 #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))));
            }
        }