diff --git a/src/Attributes/Request/TokenRequestBody.php b/src/Attributes/Request/TokenRequestBody.php index 8bcebb5df..72e0363be 100644 --- a/src/Attributes/Request/TokenRequestBody.php +++ b/src/Attributes/Request/TokenRequestBody.php @@ -19,7 +19,7 @@ use Attribute; use OpenApi\Attributes\JsonContent; use OpenApi\Attributes\RequestBody; -use Pimcore\Bundle\StudioApiBundle\Response\Schema\Token\Refresh; +use Pimcore\Bundle\StudioApiBundle\Request\Query\Refresh; #[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] final class TokenRequestBody extends RequestBody diff --git a/src/Controller/Api/Authorization/AuthorizationController.php b/src/Controller/Api/Authorization/AuthorizationController.php index 6beaf7131..7b99417eb 100644 --- a/src/Controller/Api/Authorization/AuthorizationController.php +++ b/src/Controller/Api/Authorization/AuthorizationController.php @@ -25,8 +25,8 @@ use Pimcore\Bundle\StudioApiBundle\Config\Tags; use Pimcore\Bundle\StudioApiBundle\Controller\Api\AbstractApiController; use Pimcore\Bundle\StudioApiBundle\Dto\Credentials; +use Pimcore\Bundle\StudioApiBundle\Request\Query\Refresh; use Pimcore\Bundle\StudioApiBundle\Response\Schema\Token; -use Pimcore\Bundle\StudioApiBundle\Response\Schema\Token\Refresh; use Pimcore\Bundle\StudioApiBundle\Service\SecurityServiceInterface; use Pimcore\Bundle\StudioApiBundle\Service\TokenServiceInterface; use Pimcore\Security\User\User; diff --git a/src/Response/Schema/Token/Refresh.php b/src/Request/Query/Refresh.php similarity index 83% rename from src/Response/Schema/Token/Refresh.php rename to src/Request/Query/Refresh.php index f549cd372..0ea3c6972 100644 --- a/src/Response/Schema/Token/Refresh.php +++ b/src/Request/Query/Refresh.php @@ -14,7 +14,7 @@ * @license http://www.pimcore.org/license GPLv3 and PCL */ -namespace Pimcore\Bundle\StudioApiBundle\Response\Schema\Token; +namespace Pimcore\Bundle\StudioApiBundle\Request\Query; use OpenApi\Attributes\Property; use OpenApi\Attributes\Schema; @@ -31,7 +31,12 @@ { public function __construct( #[Property(description: 'Token', type: 'string', example: 'Who you gonna call? Refresh token!')] - protected string $token + private string $token ) { } + + public function getToken(): string + { + return $this->token; + } } diff --git a/tests/Unit/Dto/Token/RefreshTest.php b/tests/Unit/Dto/Token/RefreshTest.php index 24f9e67b8..e0cd23e5b 100644 --- a/tests/Unit/Dto/Token/RefreshTest.php +++ b/tests/Unit/Dto/Token/RefreshTest.php @@ -17,7 +17,7 @@ namespace Pimcore\Bundle\StudioApiBundle\Tests\Unit\Dto\Token; use Codeception\Test\Unit; -use Pimcore\Bundle\StudioApiBundle\Response\Schema\Token\Refresh; +use Pimcore\Bundle\StudioApiBundle\Request\Query\Refresh; final class RefreshTest extends Unit {