diff --git a/code_samples/user_management/oauth_google/config/custom_services.yaml b/code_samples/user_management/oauth_google/config/custom_services.yaml index 5897e991bf..9a9e284a7a 100644 --- a/code_samples/user_management/oauth_google/config/custom_services.yaml +++ b/code_samples/user_management/oauth_google/config/custom_services.yaml @@ -6,7 +6,7 @@ services: - { name: ibexa.oauth2_client.resource_owner_mapper, identifier: google } app.components.oauth2_login: - parent: Ibexa\AdminUi\Component\TwigComponent + parent: Ibexa\TwigComponents\Component\TemplateComponent arguments: $template: '@@ibexadesign/account/login/oauth2_login.html.twig' tags: diff --git a/code_samples/user_management/oauth_google/config/packages/security.yaml b/code_samples/user_management/oauth_google/config/packages/security.yaml index fd876ef5eb..b8d1db4941 100644 --- a/code_samples/user_management/oauth_google/config/packages/security.yaml +++ b/code_samples/user_management/oauth_google/config/packages/security.yaml @@ -13,27 +13,28 @@ security: ibexa_oauth2_front: pattern: ^/ + provider: ibexa user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker - anonymous: ~ - ibexa_rest_session: ~ - guard: - authenticators: - - Ibexa\Bundle\OAuth2Client\Security\Authenticator\OAuth2Authenticator - - Ibexa\PageBuilder\Security\EditorialMode\TokenAuthenticator - entry_point: Ibexa\Bundle\OAuth2Client\Security\Authenticator\OAuth2Authenticator + custom_authenticators: + - Ibexa\Bundle\OAuth2Client\Security\Authenticator\OAuth2Authenticator + - Ibexa\PageBuilder\Security\EditorialMode\FragmentAuthenticator + entry_point: Ibexa\Bundle\OAuth2Client\Security\Authenticator\OAuth2Authenticator + context: ibexa form_login: - require_previous_session: false - csrf_token_generator: security.csrf.token_manager + enable_csrf: true logout: ~ - #ibexa_front: - # pattern: ^/ - # user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker - # anonymous: ~ - # ibexa_rest_session: ~ - # form_login: - # require_previous_session: false - # csrf_token_generator: security.csrf.token_manager - # guard: - # authenticator: 'Ibexa\PageBuilder\Security\EditorialMode\TokenAuthenticator' - # logout: ~ \ No newline at end of file + # ibexa_front: + # pattern: ^/ + # provider: ibexa + # user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker + # context: ibexa + # form_login: + # enable_csrf: true + # login_path: login + # check_path: login_check + # custom_authenticators: + # - Ibexa\PageBuilder\Security\EditorialMode\FragmentAuthenticator + # entry_point: form_login + # logout: + # path: logout diff --git a/docs/users/oauth_client.md b/docs/users/oauth_client.md index 393f0f0039..3c5fa443d6 100644 --- a/docs/users/oauth_client.md +++ b/docs/users/oauth_client.md @@ -44,15 +44,15 @@ In the following example, the OAuth2 client `google` is enabled for the `admin` ## Configure firewall -In `config/packages/security.yaml`, enable the `oauth2_connect` firewall and replace the `ibexa_front` firewall with the `ibexa_oauth2_front` one. +In `config/packages/security.yaml`, enable the `ibexa_oauth2_connect` firewall and replace the `ibexa_front` firewall with the `ibexa_oauth2_front` one. ``` yaml [[= include_file('code_samples/user_management/oauth_google/config/packages/security.yaml') =]] ``` -The `guard.authenticators` setting specifies the [Guard authenticators]([[= symfony_doc =]]/security/guard_authentication.html) to be used. +The `custom_authenticators` setting specifies the [custom authenticators]([[= symfony_doc =]]/current/security/custom_authenticator.html) to be used. -By adding the `Ibexa\Bundle\OAuth2Client\Security\Authenticator\OAuth2Authenticator` guard authenticator you add a possibility to use OAuth2 on those routes. +By adding the `Ibexa\Bundle\OAuth2Client\Security\Authenticator\OAuth2Authenticator` authenticator you add a possibility to use OAuth2 on those routes. ## Resource owner mappers