You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/fosuser-bundle.md
+30-2Lines changed: 30 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,35 @@
1
1
# FOSUser Bundle Integration
2
2
3
-
API Platform Core is shipped with a bridge for [FOSUserBundle](https://github.com/FriendsOfSymfony/FOSUserBundle). If the
4
-
FOSUser bundle is enabled, this bridge will use its `UserManager` to create, update and delete user resources.
3
+
API Platform Core is shipped with a bridge for [FOSUserBundle](https://github.com/FriendsOfSymfony/FOSUserBundle). If
4
+
the FOSUser bundle is enabled, this bridge will use its `UserManager` to create, update and delete user resources.
5
+
6
+
## Installing the Bundle
7
+
8
+
The installation procedure of the FOSUserBundle is described [in the main Symfony docs](https://symfony.com/doc/master/bundles/FOSUserBundle/index.html)
9
+
10
+
You can:
11
+
- Skip the [step 3 (Create your User class)](https://symfony.com/doc/master/bundles/FOSUserBundle/index.html#step-3-create-your-user-class)
12
+
and use the class provided in the next paragraph to set up serialization groups the correct way
13
+
- Skip the [step 4 (Configure your application's security.yml)](https://symfony.com/doc/master/bundles/FOSUserBundle/index.html#step-4-configure-your-application-s-security-yml)
14
+
if you are planning to [use a JWT-based authentication using `LexikJWTAuthenticationBundle`](jwt.md)
15
+
16
+
If you are using the API Platform Standard Edition, you will need to enable the form services in the symfony framework
17
+
configuration options:
18
+
19
+
```yaml
20
+
# app/config/config.yml
21
+
framework:
22
+
form: { enabled: true }
23
+
```
24
+
25
+
## Enabling the Bridge
26
+
27
+
To enable the provided bridge with FOSUserBundle, you need to add the following configuration to api-platform:
28
+
```yaml
29
+
# app/config/config.yml
30
+
api_platform:
31
+
enable_fos_user: true
32
+
```
5
33
6
34
## Creating a `User` Entity with Serialization Groups
0 commit comments