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"); } }