diff options
author | Jeremy <jeremy.benoist@gmail.com> | 2015-02-08 21:47:36 +0100 |
---|---|---|
committer | Jeremy <jeremy.benoist@gmail.com> | 2015-02-08 23:13:40 +0100 |
commit | d91691573f108422cc2080462af35ebd62dc93fb (patch) | |
tree | dfef307e3c79e681cbc066c7b18e91f97a294268 /app/config | |
parent | 7812f508bcb68d9d0e1868fa568d7a435e7975b7 (diff) | |
download | wallabag-d91691573f108422cc2080462af35ebd62dc93fb.tar.gz wallabag-d91691573f108422cc2080462af35ebd62dc93fb.tar.zst wallabag-d91691573f108422cc2080462af35ebd62dc93fb.zip |
Add custom auth encoder & provider
These custom classes allow Wallabag v2 to be compatible with Wallabag v1 salted password
Diffstat (limited to 'app/config')
-rw-r--r-- | app/config/security.yml | 62 | ||||
-rw-r--r-- | app/config/services.yml | 3 |
2 files changed, 33 insertions, 32 deletions
diff --git a/app/config/security.yml b/app/config/security.yml index c1b0fb77..e161c3b5 100644 --- a/app/config/security.yml +++ b/app/config/security.yml | |||
@@ -1,6 +1,6 @@ | |||
1 | security: | 1 | security: |
2 | encoders: | 2 | encoders: |
3 | Wallabag\CoreBundle\Entity\Users: | 3 | Wallabag\CoreBundle\Entity\User: |
4 | algorithm: sha1 | 4 | algorithm: sha1 |
5 | encode_as_base64: false | 5 | encode_as_base64: false |
6 | iterations: 1 | 6 | iterations: 1 |
@@ -11,7 +11,7 @@ security: | |||
11 | 11 | ||
12 | providers: | 12 | providers: |
13 | administrators: | 13 | administrators: |
14 | entity: { class: WallabagCoreBundle:Users, property: username } | 14 | entity: { class: WallabagCoreBundle:User, property: username } |
15 | 15 | ||
16 | # the main part of the security, where you can set up firewalls | 16 | # the main part of the security, where you can set up firewalls |
17 | # for specific sections of your app | 17 | # for specific sections of your app |
@@ -23,35 +23,35 @@ security: | |||
23 | pattern: ^/login$ | 23 | pattern: ^/login$ |
24 | anonymous: ~ | 24 | anonymous: ~ |
25 | 25 | ||
26 | # secured_area: | 26 | secured_area: |
27 | # pattern: ^/ | 27 | pattern: ^/ |
28 | # anonymous: ~ | 28 | anonymous: ~ |
29 | # form_login: | 29 | form_login: |
30 | # login_path: /login | 30 | login_path: /login |
31 | # | 31 | |
32 | # use_forward: false | 32 | use_forward: false |
33 | # | 33 | |
34 | # check_path: /login_check | 34 | check_path: /login_check |
35 | # | 35 | |
36 | # post_only: true | 36 | post_only: true |
37 | # | 37 | |
38 | # always_use_default_target_path: true | 38 | always_use_default_target_path: true |
39 | # default_target_path: / | 39 | default_target_path: / |
40 | # target_path_parameter: redirect_url | 40 | target_path_parameter: redirect_url |
41 | # use_referer: true | 41 | use_referer: true |
42 | # | 42 | |
43 | # failure_path: null | 43 | failure_path: null |
44 | # failure_forward: false | 44 | failure_forward: false |
45 | # | 45 | |
46 | # username_parameter: _username | 46 | username_parameter: _username |
47 | # password_parameter: _password | 47 | password_parameter: _password |
48 | # | 48 | |
49 | # csrf_parameter: _csrf_token | 49 | csrf_parameter: _csrf_token |
50 | # intention: authenticate | 50 | intention: authenticate |
51 | # | 51 | |
52 | # logout: | 52 | logout: |
53 | # path: /logout | 53 | path: /logout |
54 | # target: / | 54 | target: / |
55 | 55 | ||
56 | access_control: | 56 | access_control: |
57 | - { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY } | 57 | - { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY } |
diff --git a/app/config/services.yml b/app/config/services.yml index 5c76fc59..d4485e42 100644 --- a/app/config/services.yml +++ b/app/config/services.yml | |||
@@ -1,7 +1,8 @@ | |||
1 | # Learn more about services, parameters and containers at | 1 | # Learn more about services, parameters and containers at |
2 | # http://symfony.com/doc/current/book/service_container.html | 2 | # http://symfony.com/doc/current/book/service_container.html |
3 | parameters: | 3 | parameters: |
4 | # parameter_name: value | 4 | security.authentication.provider.dao.class: Wallabag\CoreBundle\Security\Authentication\Provider\WallabagAuthenticationProvider |
5 | security.encoder.digest.class: Wallabag\CoreBundle\Security\Authentication\Encoder\WallabagPasswordEncoder | ||
5 | 6 | ||
6 | services: | 7 | services: |
7 | # service_name: | 8 | # service_name: |