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