diff options
author | Marvin Borner | 2018-05-23 22:23:28 +0200 |
---|---|---|
committer | Marvin Borner | 2018-05-23 22:23:28 +0200 |
commit | b66a61addb6c8e66cb26fcf74b532d68891267e4 (patch) | |
tree | 05e9449ff25bdc98f68105f41923ccb9f6ef5095 /main/app/sprinkles/account/src/Authenticate/AuthGuard.php | |
parent | 1d4ef435177a5f9b6d1a289800d933e49be0c550 (diff) |
Refactored code, many fixes and improvements in chat backend+frontend
Diffstat (limited to 'main/app/sprinkles/account/src/Authenticate/AuthGuard.php')
-rw-r--r-- | main/app/sprinkles/account/src/Authenticate/AuthGuard.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/main/app/sprinkles/account/src/Authenticate/AuthGuard.php b/main/app/sprinkles/account/src/Authenticate/AuthGuard.php index efcfaae..ce64bd7 100644 --- a/main/app/sprinkles/account/src/Authenticate/AuthGuard.php +++ b/main/app/sprinkles/account/src/Authenticate/AuthGuard.php @@ -5,6 +5,7 @@ * @link https://github.com/userfrosting/UserFrosting * @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License) */ + namespace UserFrosting\Sprinkle\Account\Authenticate; use Psr\Http\Message\ResponseInterface; @@ -29,22 +30,20 @@ class AuthGuard * * @param $authenticator Authenticator The current authentication object. */ - public function __construct($authenticator) - { + public function __construct($authenticator) { $this->authenticator = $authenticator; } /** * Invoke the AuthGuard middleware, throwing an exception if there is no authenticated user in the session. * - * @param \Psr\Http\Message\ServerRequestInterface $request PSR7 request - * @param \Psr\Http\Message\ResponseInterface $response PSR7 response - * @param callable $next Next middleware + * @param \Psr\Http\Message\ServerRequestInterface $request PSR7 request + * @param \Psr\Http\Message\ResponseInterface $response PSR7 response + * @param callable $next Next middleware * * @return \Psr\Http\Message\ResponseInterface */ - public function __invoke($request, $response, $next) - { + public function __invoke($request, $response, $next) { if (!$this->authenticator->check()) { throw new AuthExpiredException(); } else { |