diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-08-18 11:08:45 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-09-11 20:32:37 +0200 |
commit | a1691859ca0cb4c1b360c34b05aa74bdba9e582a (patch) | |
tree | 47ef239ea8f452ba4de71f76c9cab607a4dadf8c /app | |
parent | 9c08a891f9bb90bc3f23a575a734283c1ee00ba1 (diff) | |
download | wallabag-a1691859ca0cb4c1b360c34b05aa74bdba9e582a.tar.gz wallabag-a1691859ca0cb4c1b360c34b05aa74bdba9e582a.tar.zst wallabag-a1691859ca0cb4c1b360c34b05aa74bdba9e582a.zip |
implement FosUser
Diffstat (limited to 'app')
-rw-r--r-- | app/AppKernel.php | 1 | ||||
-rw-r--r-- | app/config/config.yml | 5 | ||||
-rw-r--r-- | app/config/security.yml | 29 |
3 files changed, 12 insertions, 23 deletions
diff --git a/app/AppKernel.php b/app/AppKernel.php index 00206ddf..08e14b8f 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php | |||
@@ -17,6 +17,7 @@ class AppKernel extends Kernel | |||
17 | new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), | 17 | new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), |
18 | new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), | 18 | new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), |
19 | new FOS\RestBundle\FOSRestBundle(), | 19 | new FOS\RestBundle\FOSRestBundle(), |
20 | new FOS\UserBundle\FOSUserBundle(), | ||
20 | new JMS\SerializerBundle\JMSSerializerBundle(), | 21 | new JMS\SerializerBundle\JMSSerializerBundle(), |
21 | new Nelmio\ApiDocBundle\NelmioApiDocBundle(), | 22 | new Nelmio\ApiDocBundle\NelmioApiDocBundle(), |
22 | new Nelmio\CorsBundle\NelmioCorsBundle(), | 23 | new Nelmio\CorsBundle\NelmioCorsBundle(), |
diff --git a/app/config/config.yml b/app/config/config.yml index efc815b8..f623ab23 100644 --- a/app/config/config.yml +++ b/app/config/config.yml | |||
@@ -152,3 +152,8 @@ liip_theme: | |||
152 | # bundle_resource_dir: | 152 | # bundle_resource_dir: |
153 | # - %%dir%%/views/themes/%%current_theme%%/%%bundle_name%%/%%template%% | 153 | # - %%dir%%/views/themes/%%current_theme%%/%%bundle_name%%/%%template%% |
154 | # - %%dir%%/views/%%bundle_name%%/%%override_path%% | 154 | # - %%dir%%/views/%%bundle_name%%/%%override_path%% |
155 | |||
156 | fos_user: | ||
157 | db_driver: orm | ||
158 | firewall_name: main | ||
159 | user_class: Wallabag\CoreBundle\Entity\User | ||
diff --git a/app/config/security.yml b/app/config/security.yml index b9c4cbef..98846656 100644 --- a/app/config/security.yml +++ b/app/config/security.yml | |||
@@ -12,6 +12,8 @@ security: | |||
12 | providers: | 12 | providers: |
13 | administrators: | 13 | administrators: |
14 | entity: { class: WallabagCoreBundle:User, property: username } | 14 | entity: { class: WallabagCoreBundle:User, property: username } |
15 | fos_userbundle: | ||
16 | id: fos_user.user_provider.username | ||
15 | 17 | ||
16 | # the main part of the security, where you can set up firewalls | 18 | # the main part of the security, where you can set up firewalls |
17 | # for specific sections of your app | 19 | # for specific sections of your app |
@@ -26,31 +28,12 @@ security: | |||
26 | anonymous: ~ | 28 | anonymous: ~ |
27 | 29 | ||
28 | secured_area: | 30 | secured_area: |
29 | pattern: ^/ | 31 | pattern: ^/ |
30 | anonymous: ~ | ||
31 | form_login: | 32 | form_login: |
32 | login_path: /login | 33 | provider: fos_userbundle |
33 | 34 | csrf_provider: security.csrf.token_manager | |
34 | use_forward: false | ||
35 | |||
36 | check_path: /login_check | ||
37 | |||
38 | post_only: true | ||
39 | |||
40 | always_use_default_target_path: false | ||
41 | default_target_path: / | ||
42 | target_path_parameter: _target_path | ||
43 | use_referer: true | ||
44 | |||
45 | failure_path: null | ||
46 | failure_forward: false | ||
47 | |||
48 | username_parameter: _username | ||
49 | password_parameter: _password | ||
50 | |||
51 | csrf_parameter: _csrf_token | ||
52 | intention: authenticate | ||
53 | 35 | ||
36 | anonymous: true | ||
54 | remember_me: | 37 | remember_me: |
55 | key: "%secret%" | 38 | key: "%secret%" |
56 | lifetime: 31536000 | 39 | lifetime: 31536000 |