Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: ~
# 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
6 changes: 3 additions & 3 deletions docs/users/oauth_client.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading