@@ -56,7 +56,7 @@ class Client
56
56
private string $ code_challenge_method ;
57
57
private array $ pkce_algorithms = ['S256 ' => 'sha256 ' , 'plain ' => false ];
58
58
private bool $ enable_pkce ;
59
- private bool $ send_nonce ;
59
+ private bool $ enable_nonce ;
60
60
61
61
private PendingRequest $ http_client ;
62
62
@@ -88,7 +88,7 @@ public function __construct(#[ArrayShape([
88
88
'verify ' => '?bool ' ,
89
89
'scopes ' => '?array ' ,
90
90
'enable_pkce ' => '?bool ' ,
91
- 'send_nonce ' => '?bool ' ,
91
+ 'enable_nonce ' => '?bool ' ,
92
92
'allow_implicit_flow ' => '?bool ' ,
93
93
'code_challenge_method ' => '?string ' ,
94
94
'timeout ' => '?int ' ,
@@ -136,7 +136,7 @@ public function __construct(#[ArrayShape([
136
136
'issuer ' => $ provider_url ,
137
137
'scopes ' => [],
138
138
'enable_pkce ' => true ,
139
- 'send_nonce ' => true ,
139
+ 'enable_nonce ' => true ,
140
140
'allow_implicit_flow ' => false ,
141
141
'code_challenge_method ' => 'plain ' ,
142
142
'leeway ' => 300 ,
@@ -256,7 +256,7 @@ public function authenticate(): bool
256
256
// Save the id token
257
257
$ this ->id_token = $ id_token ;
258
258
259
- if ($ this ->send_nonce && $ request ->get ('nonce ' ) === Session::get ('oidc_nonce ' )) {
259
+ if ($ this ->enable_nonce && $ request ->get ('nonce ' ) === Session::get ('oidc_nonce ' )) {
260
260
return true ;
261
261
}
262
262
Session::remove ('oidc_nonce ' );
@@ -317,7 +317,7 @@ public function getAuthorizationUrl(?array $query_params=null): string
317
317
'scope ' => implode (' ' , array_merge ($ this ->scopes , ['openid ' ]))
318
318
])->merge ($ query_params );
319
319
320
- if ($ this ->send_nonce ) {
320
+ if ($ this ->enable_nonce ) {
321
321
$ nonce = Str::random ();
322
322
Session::set ('oidc_nonce ' , $ nonce );
323
323
$ params ->put ('nonce ' , $ nonce );
0 commit comments