2018-06-23 15:00:37 +00:00
|
|
|
security:
|
|
|
|
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
|
|
|
|
providers:
|
2018-06-25 21:56:32 +00:00
|
|
|
default_provider:
|
2018-06-25 01:02:27 +00:00
|
|
|
entity:
|
|
|
|
class: App\Entity\User
|
|
|
|
property: username
|
|
|
|
manager_name: default
|
2022-07-20 22:02:13 +00:00
|
|
|
enable_authenticator_manager: true
|
2022-07-10 13:51:26 +00:00
|
|
|
password_hashers:
|
2018-06-24 22:42:26 +00:00
|
|
|
App\Entity\User:
|
2022-07-10 13:51:26 +00:00
|
|
|
algorithm: sodium
|
2018-06-23 15:00:37 +00:00
|
|
|
firewalls:
|
|
|
|
dev:
|
|
|
|
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
|
|
|
security: false
|
2018-06-25 01:02:27 +00:00
|
|
|
api:
|
|
|
|
pattern: ^/api/
|
2018-06-25 16:59:51 +00:00
|
|
|
stateless: true
|
2022-07-20 22:02:13 +00:00
|
|
|
custom_authenticators:
|
|
|
|
- App\Security\ApiTokenAuthenticator
|
2018-06-25 01:02:27 +00:00
|
|
|
main:
|
|
|
|
pattern: ^/
|
2018-06-25 21:56:32 +00:00
|
|
|
provider: default_provider
|
2018-06-25 01:02:27 +00:00
|
|
|
form_login:
|
2020-01-20 17:01:51 +00:00
|
|
|
login_path: user_auth_login
|
|
|
|
check_path: user_auth_login
|
2018-06-25 01:02:27 +00:00
|
|
|
logout:
|
2020-01-20 17:01:51 +00:00
|
|
|
path: user_auth_logout
|
2018-06-25 01:02:27 +00:00
|
|
|
target: /
|
|
|
|
remember_me:
|
|
|
|
secret: '%kernel.secret%'
|
2018-10-26 00:11:32 +00:00
|
|
|
lifetime: 1209600
|
2018-06-25 01:02:27 +00:00
|
|
|
path: /
|
|
|
|
always_remember_me: true
|
2018-06-23 15:00:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Easy way to control access for large sections of your site
|
|
|
|
# Note: Only the *first* access control that matches will be used
|
|
|
|
access_control:
|
2022-07-20 22:02:13 +00:00
|
|
|
- { path: ^/api/v1/login$, roles: PUBLIC_ACCESS }
|
2018-06-25 21:56:32 +00:00
|
|
|
- { path: ^/api/, roles: ROLE_USER }
|
2022-07-20 22:02:13 +00:00
|
|
|
- { path: ^/$, roles: PUBLIC_ACCESS }
|
|
|
|
- { path: ^/auth/, roles: PUBLIC_ACCESS }
|
|
|
|
- { path: ^/register/, roles: PUBLIC_ACCESS }
|
|
|
|
- { path: ^/magnet/, roles: PUBLIC_ACCESS }
|
2018-06-25 01:02:27 +00:00
|
|
|
- { path: ^/, roles: ROLE_USER }
|