update config of security.yml

This commit is contained in:
ELMAKHROUBI ABDELLAH
2021-11-10 16:46:26 +01:00
parent 436615212d
commit 9e2b3efc80

View File

@@ -59,6 +59,7 @@ Here is a simple configuration that restrict access to ```/api/*``` routes only
```yaml
# config/packages/security.yaml
security:
enable_authenticator_manager: true
providers:
keycloak_bearer_user_provider:
id: ABEL\Bundle\keycloakBearerOnlyAdapterBundle\Security\User\KeycloakBearerUserProvider
@@ -68,13 +69,10 @@ security:
security: false
api:
pattern: ^/api/
guard:
provider: keycloak_bearer_user_provider
authenticators:
custom_authenticators:
- ABEL\Bundle\keycloakBearerOnlyAdapterBundle\Security\Authenticator\KeycloakBearerAuthenticator
stateless: true
main:
anonymous: ~
access_control:
- { path: ^/api/, roles: ROLE_API }
```