diff --git a/src/Application.php b/src/Application.php index 0bf89c9..aad0322 100644 --- a/src/Application.php +++ b/src/Application.php @@ -120,8 +120,9 @@ class Application extends BaseApplication implements AuthenticationServiceProvid ])); \SocialConnect\JWX\JWT::$screw = Configure::check('keycloak.screw') ? Configure::read('keycloak.screw') : 0; } - $middlewareQueue->add(new AuthenticationMiddleware($this)) - ->add(new BodyParserMiddleware()); + $middlewareQueue + ->add(new BodyParserMiddleware()) + ->add(new AuthenticationMiddleware($this)); return $middlewareQueue; } diff --git a/templates/Users/login.php b/templates/Users/login.php index 60d6054..f9de87f 100644 --- a/templates/Users/login.php +++ b/templates/Users/login.php @@ -20,7 +20,7 @@ use Cake\Core\Configure; $this->Form->setTemplates($template); if (!Configure::check('password_auth.enabled') || Configure::read('password_auth.enabled')) { echo sprintf('