Ejemplo n.º 1
0
        private Jws ParseJws(string token)
        {
            var tokenParts = token.Split('.');
            var header     = Base64Url.Deserialize <TokenHeader>(tokenParts[0], "JWT token header");
            var algorithm  = ParseJwsAlgorithm(header.Alg);

            return(new Jws
            {
                Parts = tokenParts,
                Header = header,
                Algorithm = algorithm
            });
        }