mirror of
https://github.com/stan220/chixana.git
synced 2026-09-08 16:28:41 +00:00
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
security:
|
|
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
|
|
# https://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
|
|
providers:
|
|
my_provider:
|
|
entity: { class: App:User, property: username }
|
|
|
|
access_control:
|
|
- { path: '^/connect/google', roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
|
- { path: '^/connect/google/check', roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
|
- { path: ^/$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
|
|
|
- { path: ^/(.+), roles: IS_AUTHENTICATED_FULLY }
|
|
|
|
firewalls:
|
|
# disables authentication for assets and the profiler, adapt it according to your needs
|
|
dev:
|
|
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
|
security: false
|
|
|
|
main:
|
|
anonymous: ~
|
|
logout:
|
|
path: /logout
|
|
target: /
|
|
logout_on_user_change: true
|
|
|
|
guard:
|
|
authenticators:
|
|
- App\Security\GoogleAuthenticator
|
|
|
|
form_login:
|
|
login_path: /connect/google
|
|
check_path: /connect/google/check
|
|
|
|
access_denied_url: /connect/google
|