change code exchange route test
This commit is contained in:
parent
b7cbe15ced
commit
f9a4b82b3b
1 changed files with 6 additions and 3 deletions
|
@ -110,11 +110,14 @@ func TestServerRoutes(t *testing.T) {
|
||||||
method: http.MethodGet,
|
method: http.MethodGet,
|
||||||
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),
|
||||||
"code": "123",
|
"client_id": client.GetID(),
|
||||||
|
"client_secret": "secret",
|
||||||
|
"redirect_uri": "https://example.com",
|
||||||
|
"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",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue