Skip to content

Commit

Permalink
add token request params to configs
Browse files Browse the repository at this point in the history
  • Loading branch information
shurwit committed Nov 19, 2024
1 parent ca88bb2 commit 83c431a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/auth/auth_type_oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ type oidcAuthConfig struct {
UserInfoURL string `json:"userinfo_url"`
Scopes string `json:"scopes"`
RequestParams map[string]string `json:"request_params"`
TokenParams map[string]string `json:"token_params"`
UseRefresh bool `json:"use_refresh"`
UsePKCE bool `json:"use_pkce"`
ClientID string `json:"client_id" validate:"required"`
Expand Down Expand Up @@ -280,6 +281,10 @@ func (a *oidcAuthImpl) newToken(code string, authType model.AuthType, appType mo
bodyData["code_verifier"] = params.CodeVerifier
}

for key, val := range oidcConfig.TokenParams {
bodyData[key] = val
}

return a.loadOidcTokensAndInfo(bodyData, oidcConfig, authType, appType, appOrg, redirectURI, l)
}

Expand Down

0 comments on commit 83c431a

Please sign in to comment.