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 }
- users:
- entity:
- # the class of the entity that represents users
- class: Entity\User
- # 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:
- # pattern: ^/api-login
- anonymous: true
- # form_login:
- # login_path: api_login
- # check_path: api_login
- lazy: true
- provider: users_in_memory
- 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: ^/admin, roles: ROLE_ADMIN }
- # - { path: ^/profile, roles: ROLE_USER }
- # - { path: ^/api-login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
Add Comment
Please, Sign In to add comment