diff options
author | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2015-10-06 09:19:06 +0200 |
---|---|---|
committer | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2015-10-06 09:19:06 +0200 |
commit | 16dabc326311f084d671be188c7941bbb3c341c9 (patch) | |
tree | 3210a7688ea2bfa1bff5fd0422b52adf570edcdc /app/config | |
parent | fdef5f460524215d806e244e5546865f4b8e01df (diff) | |
parent | 8263e71192989dc0fd28a41ac22f9c5b32eb11c4 (diff) | |
download | wallabag-16dabc326311f084d671be188c7941bbb3c341c9.tar.gz wallabag-16dabc326311f084d671be188c7941bbb3c341c9.tar.zst wallabag-16dabc326311f084d671be188c7941bbb3c341c9.zip |
Merge pull request #1436 from wallabag/v2-register
Public registration & oAuth2 \o/
Diffstat (limited to 'app/config')
-rw-r--r-- | app/config/config.yml | 18 | ||||
-rw-r--r-- | app/config/config_prod.yml | 5 | ||||
-rw-r--r-- | app/config/routing.yml | 16 | ||||
-rw-r--r-- | app/config/security.yml | 26 | ||||
-rw-r--r-- | app/config/services.yml | 5 |
5 files changed, 36 insertions, 34 deletions
diff --git a/app/config/config.yml b/app/config/config.yml index f623ab23..0d893ecf 100644 --- a/app/config/config.yml +++ b/app/config/config.yml | |||
@@ -110,7 +110,9 @@ fos_rest: | |||
110 | routing_loader: | 110 | routing_loader: |
111 | default_format: json | 111 | default_format: json |
112 | 112 | ||
113 | nelmio_api_doc: ~ | 113 | nelmio_api_doc: |
114 | sandbox: | ||
115 | enabled: false | ||
114 | 116 | ||
115 | nelmio_cors: | 117 | nelmio_cors: |
116 | defaults: | 118 | defaults: |
@@ -156,4 +158,16 @@ liip_theme: | |||
156 | fos_user: | 158 | fos_user: |
157 | db_driver: orm | 159 | db_driver: orm |
158 | firewall_name: main | 160 | firewall_name: main |
159 | user_class: Wallabag\CoreBundle\Entity\User | 161 | user_class: Wallabag\UserBundle\Entity\User |
162 | registration: | ||
163 | confirmation: | ||
164 | enabled: true | ||
165 | |||
166 | fos_oauth_server: | ||
167 | db_driver: orm | ||
168 | client_class: Wallabag\ApiBundle\Entity\Client | ||
169 | access_token_class: Wallabag\ApiBundle\Entity\AccessToken | ||
170 | refresh_token_class: Wallabag\ApiBundle\Entity\RefreshToken | ||
171 | auth_code_class: Wallabag\ApiBundle\Entity\AuthCode | ||
172 | service: | ||
173 | user_provider: fos_user.user_manager | ||
diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml index c45f0fa6..342837a0 100644 --- a/app/config/config_prod.yml +++ b/app/config/config_prod.yml | |||
@@ -17,11 +17,6 @@ monolog: | |||
17 | type: fingers_crossed | 17 | type: fingers_crossed |
18 | action_level: error | 18 | action_level: error |
19 | handler: nested | 19 | handler: nested |
20 | wsse: | ||
21 | type: stream | ||
22 | path: %kernel.logs_dir%/%kernel.environment%.wsse.log | ||
23 | level: error | ||
24 | channels: [wsse] | ||
25 | nested: | 20 | nested: |
26 | type: stream | 21 | type: stream |
27 | path: "%kernel.logs_dir%/%kernel.environment%.log" | 22 | path: "%kernel.logs_dir%/%kernel.environment%.log" |
diff --git a/app/config/routing.yml b/app/config/routing.yml index e8bf08a5..af3e32b1 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml | |||
@@ -10,16 +10,6 @@ doc-api: | |||
10 | resource: "@NelmioApiDocBundle/Resources/config/routing.yml" | 10 | resource: "@NelmioApiDocBundle/Resources/config/routing.yml" |
11 | prefix: /api/doc | 11 | prefix: /api/doc |
12 | 12 | ||
13 | login: | ||
14 | pattern: /login | ||
15 | defaults: { _controller: WallabagCoreBundle:Security:login } | ||
16 | |||
17 | login_check: | ||
18 | pattern: /login_check | ||
19 | |||
20 | logout: | ||
21 | path: /logout | ||
22 | |||
23 | rest : | 13 | rest : |
24 | type : rest | 14 | type : rest |
25 | resource : "routing_rest.yml" | 15 | resource : "routing_rest.yml" |
@@ -30,3 +20,9 @@ homepage: | |||
30 | defaults: { _controller: WallabagCoreBundle:Entry:showUnread, page : 1 } | 20 | defaults: { _controller: WallabagCoreBundle:Entry:showUnread, page : 1 } |
31 | requirements: | 21 | requirements: |
32 | page: \d+ | 22 | page: \d+ |
23 | |||
24 | fos_user: | ||
25 | resource: "@FOSUserBundle/Resources/config/routing/all.xml" | ||
26 | |||
27 | fos_oauth_server_token: | ||
28 | resource: "@FOSOAuthServerBundle/Resources/config/routing/token.xml" | ||
diff --git a/app/config/security.yml b/app/config/security.yml index 98846656..576cfd25 100644 --- a/app/config/security.yml +++ b/app/config/security.yml | |||
@@ -1,9 +1,6 @@ | |||
1 | security: | 1 | security: |
2 | encoders: | 2 | encoders: |
3 | Wallabag\CoreBundle\Entity\User: | 3 | FOS\UserBundle\Model\UserInterface: sha512 |
4 | algorithm: sha1 | ||
5 | encode_as_base64: false | ||
6 | iterations: 1 | ||
7 | 4 | ||
8 | role_hierarchy: | 5 | role_hierarchy: |
9 | ROLE_ADMIN: ROLE_USER | 6 | ROLE_ADMIN: ROLE_USER |
@@ -11,18 +8,23 @@ security: | |||
11 | 8 | ||
12 | providers: | 9 | providers: |
13 | administrators: | 10 | administrators: |
14 | entity: { class: WallabagCoreBundle:User, property: username } | 11 | entity: { class: WallabagUserBundle:User, property: username } |
15 | fos_userbundle: | 12 | fos_userbundle: |
16 | id: fos_user.user_provider.username | 13 | id: fos_user.user_provider.username |
17 | 14 | ||
18 | # the main part of the security, where you can set up firewalls | 15 | # the main part of the security, where you can set up firewalls |
19 | # for specific sections of your app | 16 | # for specific sections of your app |
20 | firewalls: | 17 | firewalls: |
21 | wsse_secured: | 18 | oauth_token: |
22 | pattern: /api/.* | 19 | pattern: ^/oauth/v2/token |
23 | wsse: true | 20 | security: false |
24 | stateless: true | 21 | |
25 | anonymous: true | 22 | api: |
23 | pattern: /api/.* | ||
24 | fos_oauth: true | ||
25 | stateless: true | ||
26 | anonymous: true | ||
27 | |||
26 | login_firewall: | 28 | login_firewall: |
27 | pattern: ^/login$ | 29 | pattern: ^/login$ |
28 | anonymous: ~ | 30 | anonymous: ~ |
@@ -45,9 +47,9 @@ security: | |||
45 | target: / | 47 | target: / |
46 | 48 | ||
47 | access_control: | 49 | access_control: |
48 | - { path: ^/api/salt, roles: IS_AUTHENTICATED_ANONYMOUSLY } | ||
49 | - { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY } | 50 | - { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY } |
50 | - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } | 51 | - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } |
51 | - { path: ^/forgot-password, roles: IS_AUTHENTICATED_ANONYMOUSLY } | 52 | - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } |
53 | - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } | ||
52 | - { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } | 54 | - { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } |
53 | - { path: ^/, roles: ROLE_USER } | 55 | - { path: ^/, roles: ROLE_USER } |
diff --git a/app/config/services.yml b/app/config/services.yml index 965bc319..ff6a582b 100644 --- a/app/config/services.yml +++ b/app/config/services.yml | |||
@@ -1,9 +1,4 @@ | |||
1 | # Learn more about services, parameters and containers at | ||
2 | # http://symfony.com/doc/current/book/service_container.html | ||
3 | parameters: | 1 | parameters: |
4 | security.authentication.provider.dao.class: Wallabag\CoreBundle\Security\Authentication\Provider\WallabagAuthenticationProvider | ||
5 | security.encoder.digest.class: Wallabag\CoreBundle\Security\Authentication\Encoder\WallabagPasswordEncoder | ||
6 | security.validator.user_password.class: Wallabag\CoreBundle\Security\Validator\WallabagUserPasswordValidator | ||
7 | lexik_form_filter.get_filter.doctrine_orm.class: Wallabag\CoreBundle\Event\Subscriber\CustomDoctrineORMSubscriber | 2 | lexik_form_filter.get_filter.doctrine_orm.class: Wallabag\CoreBundle\Event\Subscriber\CustomDoctrineORMSubscriber |
8 | 3 | ||
9 | services: | 4 | services: |