@@ -182,7 +182,7 @@ public function getAuthenticationService(ServerRequestInterface $request): Authe
182182 // ...
183183 $service->loadAuthenticator('Authentication.Jwt', [
184184 'identifier' => 'Authentication.JwtSubject',
185- 'secretKey' => file_get_contents(CONFIG . '/ jwt.key'),
185+ 'secretKey' => file_get_contents(CONFIG . 'jwt.key'),
186186 'algorithm' => 'RS256',
187187 'returnPayload' => false
188188 ]);
@@ -200,7 +200,7 @@ public function login()
200200{
201201 $result = $this->Authentication->getResult();
202202 if ($result->isValid()) {
203- $privateKey = file_get_contents(CONFIG . '/ jwt.key');
203+ $privateKey = file_get_contents(CONFIG . 'jwt.key');
204204 $user = $result->getData();
205205 $payload = [
206206 'iss' => 'myapp',
@@ -260,18 +260,19 @@ distribute it via a JWKS endpoint by configuring your app as follows:
260260``` php
261261// config/routes.php
262262$builder->setExtensions('json');
263- $builder->connect('/.well-known/: controller/* ', [
263+ $builder->connect('/.well-known/{ controller} ', [
264264 'action' => 'index',
265265], [
266- 'controller' => '(jwks)',
266+ 'controller' => 'jwks',
267+ 'pass' => [],
267268]); // connect /.well-known/jwks.json to JwksController
268269
269270// controller/JwksController.php
270271use Firebase\JWT\JWT;
271272
272273public function index()
273274{
274- $pubKey = file_get_contents(CONFIG . '/ jwt.pem');
275+ $pubKey = file_get_contents(CONFIG . 'jwt.pem');
275276 $res = openssl_pkey_get_public($pubKey);
276277 $detail = openssl_pkey_get_details($res);
277278 $key = [
@@ -315,7 +316,7 @@ Configuration options:
315316
316317- ** realm** : Default is ` null `
317318- ** qop** : Default is ` auth `
318- - ** nonce** : Default is ` uniqid(''), `
319+ - ** nonce** : Default is ` uniqid('') `
319320- ** opaque** : Default is ` null `
320321
321322## Cookie Authenticator aka "Remember Me"
@@ -371,7 +372,7 @@ Configuration options:
371372The cookie authenticator can be added to a Form & Session based
372373authentication system. Cookie authentication will automatically re-login users
373374after their session expires for as long as the cookie is valid. If a user is
374- explicity logged out via ` AuthenticationComponent::logout() ` the
375+ explicitly logged out via ` AuthenticationComponent::logout() ` the
375376authentication cookie is ** also destroyed** . An example configuration would be:
376377
377378``` php
0 commit comments