diff --git a/config/packages/security.yaml b/config/packages/security.yaml index cc77104..964ef57 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -1,5 +1,4 @@ security: - enable_authenticator_manager: true # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords password_hashers: Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto' @@ -27,20 +26,20 @@ security: pattern: ^/wopi provider: chill_chain_provider stateless: true - guard: - authenticators: - - lexik_jwt_authentication.jwt_token_authenticator + jwt: + authenticator: lexik_jwt_authentication.security.jwt_authenticator dav: pattern: ^/dav provider: chill_chain_provider stateless: true - guard: - authenticators: - - Chill\DocStoreBundle\Security\Guard\JWTOnDavUrlAuthenticator + jwt: + authenticator: chill_doc_store.jwt_on_dav_authenticator # this firewall is the main firewall for chill. It should be the last one in the stack, # unless you have specific needs chill_main: provider: chill_chain_provider + entry_point: form_login + user_checker: chill_security.user_checker form_login: csrf_parameter: _csrf_token csrf_token_id: authenticate @@ -49,14 +48,13 @@ security: path: /logout switch_user: true # end of lines added by chill-bundles recipe - user_checker: chill_security.user_checker # Easy way to control access for large sections of your site # Note: Only the *first* access control that matches will be used access_control: # those lines are added by chill-bundles recipes, and are requires to make chill-bundles working - - { path: ^/(login|logout), roles: IS_AUTHENTICATED_ANONYMOUSLY } - - { path: ^/public, roles: IS_AUTHENTICATED_ANONYMOUSLY } + - { path: ^/(login|logout), roles: PUBLIC_ACCESS } + - { path: ^/public, roles: PUBLIC_ACCESS } - { path: ^/wopi, roles: IS_AUTHENTICATED_FULLY } # access for homepage, the homepage redirect admin to admin section - { path: ^/$, roles: [ IS_AUTHENTICATED_REMEMBERED ] } diff --git a/config/routes/annotations.yaml b/config/routes/annotations.yaml index e92efc5..24051c3 100644 --- a/config/routes/annotations.yaml +++ b/config/routes/annotations.yaml @@ -1,7 +1,9 @@ controllers: - resource: ../../src/Controller/ - type: annotation + resource: + path: ../../src/Controller/ + namespace: App\Controller + type: attribute kernel: - resource: ../../src/Kernel.php - type: annotation + resource: App\Kernel + type: attribute