Skip to content

Commit

Permalink
Simplified PHPDoc for exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbyoung committed Aug 10, 2023
1 parent 52b6555 commit 000621d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Auth/Api/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@

use Aphiria\Api\Controllers\Controller;
use Aphiria\Authentication\Attributes\Authenticate;
use Aphiria\Authentication\AuthenticationSchemeNotFoundException;
use Aphiria\Authentication\IAuthenticator;
use Aphiria\Authentication\NotAuthenticatedException;
use Aphiria\Authentication\UnsupportedAuthenticationHandlerException;
use Aphiria\Net\Http\IResponse;
use Aphiria\Net\Http\Response;
use Aphiria\Routing\Attributes\Post;
use Aphiria\Routing\Attributes\RouteGroup;
use Exception;

/**
* Defines the auth controller
Expand All @@ -32,7 +30,7 @@ public function __construct(private readonly IAuthenticator $authenticator)
* Attempts to log in a user with basic auth and sets an auth token cookie on success
*
* @return IResponse The login attempt response
* @throws NotAuthenticatedException|AuthenticationSchemeNotFoundException|UnsupportedAuthenticationHandlerException Thrown if there was an error with authentication
* @throws Exception Thrown if there was an error with authentication
*/
#[Post('/login'), Authenticate('basic')]
public function logIn(): IResponse
Expand All @@ -49,7 +47,7 @@ public function logIn(): IResponse
* Logs out the user
*
* @return IResponse The logout response
* @throws AuthenticationSchemeNotFoundException|UnsupportedAuthenticationHandlerException Thrown if there was an issue with authentication
* @throws Exception Thrown if there was an issue with authentication
*/
#[Post('/logout')]
public function logOut(): IResponse
Expand Down

0 comments on commit 000621d

Please sign in to comment.