Skip to content

Commit 9b57377

Browse files
authored
Updated OAuth client doc for v5 changes (#2910)
1 parent 69564f8 commit 9b57377

File tree

3 files changed

+25
-24
lines changed

3 files changed

+25
-24
lines changed

code_samples/user_management/oauth_google/config/custom_services.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
- { name: ibexa.oauth2_client.resource_owner_mapper, identifier: google }
77

88
app.components.oauth2_login:
9-
parent: Ibexa\AdminUi\Component\TwigComponent
9+
parent: Ibexa\TwigComponents\Component\TemplateComponent
1010
arguments:
1111
$template: '@@ibexadesign/account/login/oauth2_login.html.twig'
1212
tags:

code_samples/user_management/oauth_google/config/packages/security.yaml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,28 @@ security:
1313

1414
ibexa_oauth2_front:
1515
pattern: ^/
16+
provider: ibexa
1617
user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker
17-
anonymous: ~
18-
ibexa_rest_session: ~
19-
guard:
20-
authenticators:
21-
- Ibexa\Bundle\OAuth2Client\Security\Authenticator\OAuth2Authenticator
22-
- Ibexa\PageBuilder\Security\EditorialMode\TokenAuthenticator
23-
entry_point: Ibexa\Bundle\OAuth2Client\Security\Authenticator\OAuth2Authenticator
18+
custom_authenticators:
19+
- Ibexa\Bundle\OAuth2Client\Security\Authenticator\OAuth2Authenticator
20+
- Ibexa\PageBuilder\Security\EditorialMode\FragmentAuthenticator
21+
entry_point: Ibexa\Bundle\OAuth2Client\Security\Authenticator\OAuth2Authenticator
22+
context: ibexa
2423
form_login:
25-
require_previous_session: false
26-
csrf_token_generator: security.csrf.token_manager
24+
enable_csrf: true
2725
logout: ~
2826

29-
#ibexa_front:
30-
# pattern: ^/
31-
# user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker
32-
# anonymous: ~
33-
# ibexa_rest_session: ~
34-
# form_login:
35-
# require_previous_session: false
36-
# csrf_token_generator: security.csrf.token_manager
37-
# guard:
38-
# authenticator: 'Ibexa\PageBuilder\Security\EditorialMode\TokenAuthenticator'
39-
# logout: ~
27+
# ibexa_front:
28+
# pattern: ^/
29+
# provider: ibexa
30+
# user_checker: Ibexa\Core\MVC\Symfony\Security\UserChecker
31+
# context: ibexa
32+
# form_login:
33+
# enable_csrf: true
34+
# login_path: login
35+
# check_path: login_check
36+
# custom_authenticators:
37+
# - Ibexa\PageBuilder\Security\EditorialMode\FragmentAuthenticator
38+
# entry_point: form_login
39+
# logout:
40+
# path: logout

docs/users/oauth_client.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ In the following example, the OAuth2 client `google` is enabled for the `admin`
4444

4545
## Configure firewall
4646

47-
In `config/packages/security.yaml`, enable the `oauth2_connect` firewall and replace the `ibexa_front` firewall with the `ibexa_oauth2_front` one.
47+
In `config/packages/security.yaml`, enable the `ibexa_oauth2_connect` firewall and replace the `ibexa_front` firewall with the `ibexa_oauth2_front` one.
4848

4949
``` yaml
5050
[[= include_file('code_samples/user_management/oauth_google/config/packages/security.yaml') =]]
5151
```
5252

53-
The `guard.authenticators` setting specifies the [Guard authenticators]([[= symfony_doc =]]/security/guard_authentication.html) to be used.
53+
The `custom_authenticators` setting specifies the [custom authenticators]([[= symfony_doc =]]/current/security/custom_authenticator.html) to be used.
5454

55-
By adding the `Ibexa\Bundle\OAuth2Client\Security\Authenticator\OAuth2Authenticator` guard authenticator you add a possibility to use OAuth2 on those routes.
55+
By adding the `Ibexa\Bundle\OAuth2Client\Security\Authenticator\OAuth2Authenticator` authenticator you add a possibility to use OAuth2 on those routes.
5656

5757
## Resource owner mappers
5858

0 commit comments

Comments
 (0)