Skip to content

Commit

Permalink
Move Refresh to request
Browse files Browse the repository at this point in the history
  • Loading branch information
mattamon committed Apr 17, 2024
1 parent f931036 commit 29a10b4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Attributes/Request/TokenRequestBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
}
2 changes: 1 addition & 1 deletion tests/Unit/Dto/Token/RefreshTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 29a10b4

Please sign in to comment.