Skip to content

Commit

Permalink
feat: Register RoadizUserBundle
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Jun 13, 2022
1 parent 498fd5d commit 5bba2bb
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 18 deletions.
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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": [
Expand All @@ -137,7 +140,8 @@
"roadiz/roadiz": "*",
"roadiz/core-bundle": "*",
"roadiz/compat-bundle": "*",
"roadiz/rozier-bundle": "*"
"roadiz/rozier-bundle": "*",
"roadiz/user-bundle": "*"
},
"scripts": {
"auto-scripts": {
Expand Down
44 changes: 27 additions & 17 deletions config/api_resources/user.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 5bba2bb

Please sign in to comment.