1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
jms_security_extra:
secure_all_services: false
expressions: true
security:
encoders:
Symfony\Component\Security\Core\User\User: plaintext
FOS\UserBundle\Model\UserInterface: sha512
role_hierarchy:
ROLE_MEMBER: ROLE_MEMBER
ROLE_ADMIN: [ ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH ]
providers:
chain_provider:
chain:
providers: [in_memory, fos_userbundle]
fos_userbundle:
id: fos_user.user_provider.username_email
in_memory:
memory:
users:
admin: { password: admin, roles: [ 'ROLE_ADMIN' ] }
member: { password: member, roles: [ 'ROLE_MEMBER' ] }
firewalls:
main:
pattern: ^/
form_login:
provider: chain_provider
csrf_provider: form.csrf_provider
# default_target_path: /admin/
logout: true
anonymous: true
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
# login:
# pattern: ^/demo/secured/login$
# security: false
#
# secured_area:
# pattern: ^/demo/secured/
# form_login:
# check_path: /demo/secured/login_check
# login_path: /demo/secured/login
# logout:
# path: /demo/secured/logout
# target: /demo/
# #anonymous: ~
# #http_basic:
# # realm: "Secured Demo Area"
access_control:
#- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
#
# You must uncomment the two following rules to restrict access to paths
# starting with the /_internal prefix to only localhost
#- { path: ^/_internal/secure, roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: 127.0.0.1 }
#- { path: ^/_internal/secure, roles: ROLE_NO_ACCESS }
- { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/admin, role: ROLE_ADMIN }
- { path: ^/member, role: ROLE_MEMBER }
- { path: ^/, role: IS_AUTHENTICATED_ANONYMOUSLY } |
Partager