You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

62 lines
2.3 KiB

security:
# https://symfony.com/doc/current/security/experimental_authenticators.html
enable_authenticator_manager: true
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
password_hashers:
App\Entity\User:
algorithm: argon2i
role_hierarchy:
role_admin: ROLE_USER
role_super_admin: ROLE_SUPER_ADMIN
providers:
pdadmin_auth:
entity:
class: App\Entity\User
property: email
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
admin:
pattern: /admin(.*)
provider: pdadmin_auth
lazy: true
user_checker: Pd\UserBundle\Security\UserChecker
switch_user: true
http_basic: ~
entry_point: form_login
form_login:
use_referer: true
login_path: security_login
check_path: security_login
# provider: fos_userbundle
# login_path: /admin/login
use_forward: false
# check_path: /admin/login_check
failure_path: null
# csrf_token_generator: security.csrf.token_manager
logout:
path: security_logout
#path: /admin/logout
remember_me:
secret: '%env(APP_SECRET)%'
#lifetime: 604800
path: /
main:
lazy: true
#provider: users_in_memory
# 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/login$, role: PUBLIC_ACCESS }
- { path: ^/admin/register, role: PUBLIC_ACCESS }
- { path: ^/admin/resetting, role: PUBLIC_ACCESS }
- { path: ^/admin, roles: ROLE_ADMIN }
- { path: ^/profile, roles: ROLE_USER }