Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- security:
- encoders:
- Entity\User:
- algorithm: bcrypt
- # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
- providers:
- # users_in_memory: { memory: null }
- fetcher:
- id: Frontend\Security\UserProvider
- # users:
- # entity:
- # the class of the entity that represents users
- # class: Frontend\Security\UserProvider
- # the property to query by - e.g. username, email, etc
- # property: username
- # optional: if you're using multiple Doctrine entity
- # managers, this option defines which one to use
- # manager_name: 'customer'
- firewalls:
- dev:
- pattern: ^/(_(profiler|wdt)|css|images|js)/
- security: false
- main:
- anonymous: true
- provider: fetcher
- user_checker: Frontend\Security\UserChecker
- form_login: true
- lazy: true
- guard:
- authenticators:
- - Frontend\Security\ApiAuthenticator
- logout:
- path: api_logout
- # where to redirect after logout
- # target: app_any_route
- # activate different ways to authenticate
- # https://symfony.com/doc/current/security.html#firewalls-authentication
- # https://symfony.com/doc/current/security/impersonating_user.html
- # switch_user: true
- # Easy way to control access for large sections of your site
- # Note: Only the *first* access control that matches will be used
- access_control:
- - { path: ^/api-login, roles: ROLE_ADMIN }
Add Comment
Please, Sign In to add comment