Skip to content

Commit

Permalink
OpenID Connect Conformance Part 4 (#189)
Browse files Browse the repository at this point in the history
Make the client_id during code exchange optional, as this is now an
authenticated client.
  • Loading branch information
spjmurray authored Feb 17, 2025
1 parent ea97025 commit f940c90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/identity/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: A Helm chart for deploying Unikorn's IdP

type: application

version: v0.2.57-rc3
appVersion: v0.2.57-rc3
version: v0.2.57-rc4
appVersion: v0.2.57-rc4

icon: https://raw.githubusercontent.com/unikorn-cloud/assets/main/images/logos/dark-on-light/icon.png

Expand Down
3 changes: 1 addition & 2 deletions pkg/oauth2/oauth2.go
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,6 @@ func tokenValidate(r *http.Request) error {
}

required := []string{
"client_id",
"client_secret",
"redirect_uri",
"code",
Expand All @@ -786,7 +785,7 @@ func tokenValidateCode(code *Code, r *http.Request) error {
return nil
}

if code.ClientID != r.Form.Get("client_id") {
if r.Form.Has("client_id") && code.ClientID != r.Form.Get("client_id") {
return errors.OAuth2InvalidGrant("client_id mismatch")
}

Expand Down

0 comments on commit f940c90

Please sign in to comment.