private void ValidateEnvelope(JsonWebTokenEnvelope envelope)
        {
            if (envelope.Type != "JWT")
            {
                throw new Exception("Unsupported token type");
            }

            if (envelope.Algorithm != "HS256")
            {
                throw new Exception("Unsupported crypto algorithm");
            }
        }
Exemplo n.º 2
0
        private void ValidateEnvelope(JsonWebTokenEnvelope envelope)
        {
            if (envelope.Type != "JWT")
            {
                throw new Exception("Unsupported token type");
            }

            if (envelope.Algorithm != "HS256")
            {
                throw new Exception("Unsupported crypto algorithm");
            }
        }