change code exchange route test

This commit is contained in:
Tim Möhlmann 2023-09-25 12:18:14 +03:00
parent b7cbe15ced
commit f9a4b82b3b

View file

@ -111,10 +111,13 @@ func TestServerRoutes(t *testing.T) {
path: testProvider.TokenEndpoint().Relative(), path: testProvider.TokenEndpoint().Relative(),
values: map[string]string{ values: map[string]string{
"grant_type": string(oidc.GrantTypeCode), "grant_type": string(oidc.GrantTypeCode),
"client_id": client.GetID(),
"client_secret": "secret",
"redirect_uri": "https://example.com",
"code": "123", "code": "123",
}, },
wantCode: http.StatusBadRequest, wantCode: http.StatusBadRequest,
json: `{"error":"invalid_request", "error_description":"client_id or client_assertion must be provided"}`, json: `{"error":"invalid_grant", "error_description":"invalid code"}`,
}, },
{ {
name: "JWT authorization", name: "JWT authorization",