Skip to content

Commit dbdd48d

Browse files
Update jwt.md
1 parent b872156 commit dbdd48d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

core/jwt.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,18 @@ security:
154154
- { path: ^/, roles: IS_AUTHENTICATED_FULLY }
155155
```
156156

157+
### Be sure to have lexik_jwt_authentication configured on your user_identity_field
158+
159+
```yaml
160+
# api/config/packages/lexik_jwt_authentication.yaml
161+
lexik_jwt_authentication:
162+
secret_key: '%env(resolve:JWT_SECRET_KEY)%'
163+
public_key: '%env(resolve:JWT_PUBLIC_KEY)%'
164+
pass_phrase: '%env(JWT_PASSPHRASE)%'
165+
166+
user_identity_field: email # Or the field you have setted using make:user
167+
```
168+
157169
## Documenting the Authentication Mechanism with Swagger/Open API
158170

159171
Want to test the routes of your JWT-authentication-protected API?

0 commit comments

Comments
 (0)