Skip to content

Commit

Permalink
Two methods in auth controller
Browse files Browse the repository at this point in the history
  • Loading branch information
mattamon committed May 23, 2024
1 parent 65241d7 commit f41f294
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/Authorization/Controller/AuthorizationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
use Pimcore\Bundle\StudioBackendBundle\Controller\AbstractApiController;
use Pimcore\Bundle\StudioBackendBundle\Exception\AccessDeniedException;
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attributes\Response\DefaultResponses;
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attributes\Response\Error\MethodNotAllowedResponse;
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attributes\Response\Error\UnauthorizedResponse;
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attributes\Response\Error\UnprocessableContentResponse;
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attributes\Response\Error\UnsupportedMediaTypeResponse;
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attributes\Response\SuccessResponse;
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Config\Tags;
use Pimcore\Bundle\StudioBackendBundle\Security\Service\SecurityServiceInterface;
Expand Down Expand Up @@ -98,10 +94,9 @@ public function login(#[MapRequestPayload] Credentials $credentials): JsonRespon
description: 'Token, lifetime and user identifier',
content: new JsonContent(ref: Token::class)
)]
#[UnauthorizedResponse]
#[MethodNotAllowedResponse]
#[UnsupportedMediaTypeResponse]
#[UnprocessableContentResponse]
#[DefaultResponses([
HttpResponseCodes::UNAUTHORIZED
])]
public function refresh(#[MapRequestPayload] Refresh $refresh): JsonResponse
{
$tokenInfo = $this->tokenService->refreshToken($refresh->getToken());
Expand Down

0 comments on commit f41f294

Please sign in to comment.