diff --git a/src/Authorization/Controller/AuthorizationController.php b/src/Authorization/Controller/AuthorizationController.php index 75305ee58..4798e68d1 100644 --- a/src/Authorization/Controller/AuthorizationController.php +++ b/src/Authorization/Controller/AuthorizationController.php @@ -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; @@ -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());