File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -268,6 +268,10 @@ function getAuthZArgs(r) {
268
268
var nonceHash = h . digest ( 'base64url' ) ;
269
269
var authZArgs = "?response_type=code&scope=" + r . variables . oidc_scopes + "&client_id=" + r . variables . oidc_client + "&redirect_uri=" + r . variables . redirect_base + r . variables . redir_location + "&nonce=" + nonceHash ;
270
270
271
+ if ( r . variables . oidc_authz_extra_args ) {
272
+ authZArgs += "&" + r . variables . oidc_authz_extra_args ;
273
+ }
274
+
271
275
r . headersOut [ 'Set-Cookie' ] = [
272
276
"auth_redir=" + r . variables . request_uri + "; " + r . variables . oidc_cookie_flags ,
273
277
"auth_nonce=" + noncePlain + "; " + r . variables . oidc_cookie_flags
Original file line number Diff line number Diff line change @@ -8,6 +8,18 @@ map $host $oidc_authz_endpoint {
8
8
#www.example.com "https://my-idp/oauth2/v1/authorize";
9
9
}
10
10
11
+ map $host $oidc_authz_extra_args {
12
+ # Extra arguments to include in the request to the IdP's authorization
13
+ # endpoint.
14
+ # Some IdPs provide extended capabilities controlled by extra arguments,
15
+ # for example Keycloak can select an IdP to delegate to via the
16
+ # "kc_idp_hint" argument.
17
+ # Arguments must be expressed as query string parameters and URL-encoded
18
+ # if required.
19
+ default "" ;
20
+ #www.example.com "kc_idp_hint=another_provider"
21
+ }
22
+
11
23
map $host $oidc_token_endpoint {
12
24
default "http://127.0.0.1:8080/auth/realms/master/protocol/openid-connect/token" ;
13
25
}
You can’t perform that action at this time.
0 commit comments