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