]> git.immae.eu Git - github/wallabag/wallabag.git/blob - app/config/security.yml
Merge pull request #1362 from wallabag/v2-fosuser
[github/wallabag/wallabag.git] / app / config / security.yml
1 security:
2 encoders:
3 Wallabag\CoreBundle\Entity\User:
4 algorithm: sha1
5 encode_as_base64: false
6 iterations: 1
7
8 role_hierarchy:
9 ROLE_ADMIN: ROLE_USER
10 ROLE_SUPER_ADMIN: [ ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH ]
11
12 providers:
13 administrators:
14 entity: { class: WallabagCoreBundle:User, property: username }
15 fos_userbundle:
16 id: fos_user.user_provider.username
17
18 # the main part of the security, where you can set up firewalls
19 # for specific sections of your app
20 firewalls:
21 wsse_secured:
22 pattern: /api/.*
23 wsse: true
24 stateless: true
25 anonymous: true
26 login_firewall:
27 pattern: ^/login$
28 anonymous: ~
29
30 secured_area:
31 pattern: ^/
32 form_login:
33 provider: fos_userbundle
34 csrf_provider: security.csrf.token_manager
35
36 anonymous: true
37 remember_me:
38 key: "%secret%"
39 lifetime: 31536000
40 path: /
41 domain: ~
42
43 logout:
44 path: /logout
45 target: /
46
47 access_control:
48 - { path: ^/api/salt, roles: IS_AUTHENTICATED_ANONYMOUSLY }
49 - { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY }
50 - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
51 - { path: ^/forgot-password, roles: IS_AUTHENTICATED_ANONYMOUSLY }
52 - { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
53 - { path: ^/, roles: ROLE_USER }