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))));
        }
        public override bool CanReadToken(string tokenString)
        {
            // unbase64 header if necessary
            if (HeaderEncoding.IsBase64Encoded(tokenString))
            {
                tokenString = HeaderEncoding.DecodeBase64(tokenString);
            }

            if (tokenString.StartsWith("<"))
            {
                return(base.CanReadToken(new XmlTextReader(new StringReader(tokenString))));
            }

            return(base.CanReadToken(tokenString));
        }
        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))));
            }
        }