Skip to content

Instantly share code, notes, and snippets.

@morontt
Created May 29, 2014 12:50
Show Gist options
  • Save morontt/d92988a619520eba7262 to your computer and use it in GitHub Desktop.
Save morontt/d92988a619520eba7262 to your computer and use it in GitHub Desktop.
example security.yml
security:
encoders:
Xxx\UserBundle\Entity\User: sha512
role_hierarchy:
ROLE_ADMIN: ROLE_USER
ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
providers:
main:
entity: { class: Xxx\UserBundle\Entity\User, property: username }
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
login:
pattern: ^/login$
security: false
secured_area:
pattern: ^/
anonymous: ~
form_login:
check_path: login_check
login_path: login
logout:
path: logout
target: /
access_control:
#- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment