Instantly share code, notes, and snippets.

Embed
What would you like to do?
Symfony - Création d'un espace sécurisé (Config)
security:
encoders:
Symfony\Component\Security\Core\User\User: plaintext
providers:
in_memory:
memory:
users:
admin:
password: "PASSWORD123"
roles: 'ROLE_ADMIN'
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
admin:
provider: in_memory
pattern: ^/admin
form_login:
login_path: login
check_path: login_check
default_target_path: admin
logout:
path: logout
target: homepage
main:
anonymous: ~
access_control:
admin:
path: ^/admin
roles: ROLE_ADMIN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment