Skip to content

Commit

Permalink
fix: add RFC 8414 pkce info to OpenID Connect Discovery (#2547)
Browse files Browse the repository at this point in the history
Closes #2311
  • Loading branch information
gbolo committed Jun 3, 2021
1 parent 81e0784 commit 9693168
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions oauth2/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ type WellKnown struct {
// the Request Object is passed by value (using the request parameter) and when it is passed by reference
// (using the request_uri parameter).
RequestObjectSigningAlgValuesSupported []string `json:"request_object_signing_alg_values_supported"`

// JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported
// by this authorization server.
CodeChallengeMethodsSupported []string `json:"code_challenge_methods_supported"`
}

// swagger:parameters deleteOAuth2Token
Expand Down
1 change: 1 addition & 0 deletions oauth2/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ func (h *Handler) WellKnownHandler(w http.ResponseWriter, r *http.Request) {
FrontChannelLogoutSessionSupported: true,
EndSessionEndpoint: urlx.AppendPaths(h.c.IssuerURL(), LogoutPath).String(),
RequestObjectSigningAlgValuesSupported: []string{"RS256", "none"},
CodeChallengeMethodsSupported: []string{"plain", "S256"},
})
}

Expand Down
1 change: 1 addition & 0 deletions oauth2/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ func TestHandlerWellKnown(t *testing.T) {
FrontChannelLogoutSessionSupported: true,
EndSessionEndpoint: urlx.AppendPaths(conf.IssuerURL(), oauth2.LogoutPath).String(),
RequestObjectSigningAlgValuesSupported: []string{"RS256", "none"},
CodeChallengeMethodsSupported: []string{"plain", "S256"},
}
var wellKnownResp oauth2.WellKnown
err = json.NewDecoder(res.Body).Decode(&wellKnownResp)
Expand Down

0 comments on commit 9693168

Please sign in to comment.