diff --git a/composer.json b/composer.json index 896951e4..a90c249b 100644 --- a/composer.json +++ b/composer.json @@ -23,6 +23,8 @@ "limenius/liform-bundle": "dev-master", "nelmio/cors-bundle": "^2.2", "phpdocumentor/reflection-docblock": "^5.2", + "roadiz/user-bundle": "~2.0.0 || dev-develop", + "roadiz/rozier-bundle": "~2.0.0 || dev-develop", "roadiz/compat-bundle": "~2.0.0 || dev-develop", "roadiz/core-bundle": "~2.0.0 || dev-develop", "rollerworks/password-strength-bundle": "^2.2", @@ -118,6 +120,7 @@ "RZ\\Roadiz\\CoreBundle\\": "lib/RoadizCoreBundle/src/", "RZ\\Roadiz\\CompatBundle\\": "lib/RoadizCompatBundle/src/", "RZ\\Roadiz\\RozierBundle\\": "lib/RoadizRozierBundle/src/", + "RZ\\Roadiz\\UserBundle\\": "lib/RoadizUserBundle/src/", "Themes\\": "themes/" }, "files": [ @@ -137,7 +140,8 @@ "roadiz/roadiz": "*", "roadiz/core-bundle": "*", "roadiz/compat-bundle": "*", - "roadiz/rozier-bundle": "*" + "roadiz/rozier-bundle": "*", + "roadiz/user-bundle": "*" }, "scripts": { "auto-scripts": { diff --git a/config/api_resources/user.yaml b/config/api_resources/user.yaml index 1a1538de..56baa8ad 100644 --- a/config/api_resources/user.yaml +++ b/config/api_resources/user.yaml @@ -1,43 +1,53 @@ +--- RZ\Roadiz\CoreBundle\Entity\User: - collectionOperations: [ ] - itemOperations: + iri: User + shortName: User + collectionOperations: signup: method: 'POST' - path: '/signup' + path: '/users/signup' controller: RZ\Roadiz\UserBundle\Controller\SignupController + input: RZ\Roadiz\UserBundle\Api\Dto\UserInput openapi_context: summary: Create a new public user description: | Create a new public user. User won't be validated and will not be granted with any role + + itemOperations: + information: + method: 'GET' + read: false + path: '/users/me' + controller: RZ\Roadiz\UserBundle\Controller\InformationController + output: RZ\Roadiz\UserBundle\Api\Dto\UserOutput + openapi_context: + summary: Get current user (JWT) information + description: | + Get current user (JWT) information validate: - method: 'POST' - path: '/validate' + method: 'PATCH' + path: '/users/{id}/validate' controller: RZ\Roadiz\UserBundle\Controller\ValidateController + input: RZ\Roadiz\UserBundle\Api\Dto\UserTokenInput openapi_context: summary: Validate a public user email description: | Validate a public user email with a unique and temporary token password_request: - method: 'POST' - path: '/password_request' + method: 'PATCH' + path: '/users/{id}/password_request' controller: RZ\Roadiz\UserBundle\Controller\PasswordRequestController + input: RZ\Roadiz\UserBundle\Api\Dto\UserPasswordRequestInput openapi_context: summary: Request a public user new password description: | Initiate a public user new password request (forgot my password) password_reset: - method: 'POST' - path: '/password_reset' + method: 'PATCH' + path: '/users/{id}/password_reset' controller: RZ\Roadiz\UserBundle\Controller\PasswordResetController + input: RZ\Roadiz\UserBundle\Api\Dto\UserPasswordTokenInput openapi_context: summary: Reset a public user password description: | Change a public user password against a unique temporary token (forgot my password) - information: - method: 'GET' - path: '/me' - controller: RZ\Roadiz\UserBundle\Controller\InformationController - openapi_context: - summary: Get current user (JWT) information - description: | - Get current user (JWT) information diff --git a/config/bundles.php b/config/bundles.php index 78315782..34f8b746 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -15,6 +15,7 @@ RZ\Roadiz\CoreBundle\RoadizCoreBundle::class => ['all' => true], RZ\Roadiz\CompatBundle\RoadizCompatBundle::class => ['all' => true], RZ\Roadiz\RozierBundle\RoadizRozierBundle::class => ['all' => true], + RZ\Roadiz\UserBundle\RoadizUserBundle::class => ['all' => true], JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true], Symfony\Cmf\Bundle\RoutingBundle\CmfRoutingBundle::class => ['all' => true], Rollerworks\Bundle\PasswordStrengthBundle\RollerworksPasswordStrengthBundle::class => ['all' => true],