2015-01-22 08:30:07 +01:00
|
|
|
security:
|
|
|
|
encoders:
|
2015-09-29 14:31:52 +02:00
|
|
|
FOS\UserBundle\Model\UserInterface: sha512
|
2015-01-22 08:30:07 +01:00
|
|
|
|
|
|
|
role_hierarchy:
|
|
|
|
ROLE_ADMIN: ROLE_USER
|
2015-01-31 15:14:10 +01:00
|
|
|
ROLE_SUPER_ADMIN: [ ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH ]
|
2015-01-22 08:30:07 +01:00
|
|
|
|
|
|
|
providers:
|
2015-01-31 15:14:10 +01:00
|
|
|
administrators:
|
2015-10-02 14:51:41 +02:00
|
|
|
entity: { class: WallabagUserBundle:User, property: username }
|
2015-08-18 11:08:45 +02:00
|
|
|
fos_userbundle:
|
|
|
|
id: fos_user.user_provider.username
|
2015-01-22 08:30:07 +01:00
|
|
|
|
|
|
|
# the main part of the security, where you can set up firewalls
|
|
|
|
# for specific sections of your app
|
|
|
|
firewalls:
|
2015-09-29 14:31:52 +02:00
|
|
|
oauth_token:
|
|
|
|
pattern: ^/oauth/v2/token
|
|
|
|
security: false
|
2015-10-03 13:30:12 +02:00
|
|
|
|
2015-09-29 14:31:52 +02:00
|
|
|
api:
|
|
|
|
pattern: /api/.*
|
|
|
|
fos_oauth: true
|
|
|
|
stateless: true
|
2015-09-29 14:52:46 +02:00
|
|
|
anonymous: true
|
2015-09-29 14:31:52 +02:00
|
|
|
|
2015-01-31 15:14:10 +01:00
|
|
|
login_firewall:
|
|
|
|
pattern: ^/login$
|
|
|
|
anonymous: ~
|
|
|
|
|
2015-02-08 21:47:36 +01:00
|
|
|
secured_area:
|
2015-08-18 11:08:45 +02:00
|
|
|
pattern: ^/
|
2015-02-08 21:47:36 +01:00
|
|
|
form_login:
|
2015-08-18 11:08:45 +02:00
|
|
|
provider: fos_userbundle
|
|
|
|
csrf_provider: security.csrf.token_manager
|
2015-02-08 21:47:36 +01:00
|
|
|
|
2015-08-18 11:08:45 +02:00
|
|
|
anonymous: true
|
2015-08-12 12:27:12 +02:00
|
|
|
remember_me:
|
|
|
|
key: "%secret%"
|
|
|
|
lifetime: 31536000
|
|
|
|
path: /
|
|
|
|
domain: ~
|
|
|
|
|
2015-02-08 21:47:36 +01:00
|
|
|
logout:
|
|
|
|
path: /logout
|
|
|
|
target: /
|
2015-01-31 15:14:10 +01:00
|
|
|
|
2015-01-22 08:30:07 +01:00
|
|
|
access_control:
|
2015-02-02 12:54:14 +01:00
|
|
|
- { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
2015-01-31 15:14:10 +01:00
|
|
|
- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
2015-09-29 14:31:52 +02:00
|
|
|
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
|
2015-10-02 14:51:41 +02:00
|
|
|
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
|
2015-03-28 21:43:49 +01:00
|
|
|
- { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
|
2015-01-31 15:14:10 +01:00
|
|
|
- { path: ^/, roles: ROLE_USER }
|