Skip to content

[Security] use lazy anonymous #13155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2020
Merged
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
2 changes: 1 addition & 1 deletion security/form_login.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ First, enable ``form_login`` under your firewall:

firewalls:
main:
anonymous: ~
anonymous: lazy
form_login:
login_path: login
check_path: login
Expand Down
6 changes: 3 additions & 3 deletions security/guard_authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Finally, configure your ``firewalls`` key in ``security.yaml`` to use this authe
# ...

main:
anonymous: ~
anonymous: lazy
logout: ~

guard:
Expand All @@ -213,7 +213,7 @@ Finally, configure your ``firewalls`` key in ``security.yaml`` to use this authe
<!-- if you want, disable storing the user in the session
add 'stateless="true"' to the firewall -->
<firewall name="main" pattern="^/">
<anonymous/>
<anonymous lazy="true"/>
<logout/>

<guard>
Expand All @@ -236,7 +236,7 @@ Finally, configure your ``firewalls`` key in ``security.yaml`` to use this authe
'firewalls' => [
'main' => [
'pattern' => '^/',
'anonymous' => true,
'anonymous' => 'lazy',
'logout' => true,
'guard' => [
'authenticators' => [
Expand Down
12 changes: 6 additions & 6 deletions security/json_login_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ First, enable the JSON login under your firewall:

firewalls:
main:
anonymous: ~
anonymous: lazy
json_login:
check_path: /login

Expand All @@ -33,7 +33,7 @@ First, enable the JSON login under your firewall:

<config>
<firewall name="main">
<anonymous/>
<anonymous lazy="true"/>
<json-login check-path="/login"/>
</firewall>
</config>
Expand All @@ -45,7 +45,7 @@ First, enable the JSON login under your firewall:
$container->loadFromExtension('security', [
'firewalls' => [
'main' => [
'anonymous' => null,
'anonymous' => 'lazy',
'json_login' => [
'check_path' => '/login',
],
Expand Down Expand Up @@ -163,7 +163,7 @@ The security configuration should be:

firewalls:
main:
anonymous: ~
anonymous: lazy
json_login:
check_path: login
username_path: security.credentials.login
Expand All @@ -181,7 +181,7 @@ The security configuration should be:

<config>
<firewall name="main">
<anonymous/>
<anonymous lazy="true"/>
<json-login check-path="login"
username-path="security.credentials.login"
password-path="security.credentials.password"/>
Expand All @@ -195,7 +195,7 @@ The security configuration should be:
$container->loadFromExtension('security', [
'firewalls' => [
'main' => [
'anonymous' => null,
'anonymous' => 'lazy',
'json_login' => [
'check_path' => 'login',
'username_path' => 'security.credentials.login',
Expand Down
12 changes: 6 additions & 6 deletions security/multiple_guard_authenticators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This is how your security configuration can look in action:
# ...
firewalls:
default:
anonymous: ~
anonymous: lazy
guard:
authenticators:
- App\Security\LoginFormAuthenticator
Expand All @@ -47,7 +47,7 @@ This is how your security configuration can look in action:
<config>
<!-- ... -->
<firewall name="default">
<anonymous/>
<anonymous lazy="true"/>
<guard entry-point="App\Security\LoginFormAuthenticator">
<authenticator>App\Security\LoginFormAuthenticator</authenticator>
<authenticator>App\Security\FacebookConnectAuthenticator</authenticator>
Expand All @@ -66,7 +66,7 @@ This is how your security configuration can look in action:
// ...
'firewalls' => [
'default' => [
'anonymous' => null,
'anonymous' => 'lazy',
'guard' => [
'entry_point' => LoginFormAuthenticator::class,
'authenticators' => [
Expand Down Expand Up @@ -103,7 +103,7 @@ the solution is to split the configuration into two separate firewalls:
authenticators:
- App\Security\ApiTokenAuthenticator
default:
anonymous: ~
anonymous: lazy
guard:
authenticators:
- App\Security\LoginFormAuthenticator
Expand All @@ -130,7 +130,7 @@ the solution is to split the configuration into two separate firewalls:
</guard>
</firewall>
<firewall name="default">
<anonymous/>
<anonymous lazy="true"/>
<guard>
<authenticator>App\Security\LoginFormAuthenticator</authenticator>
</guard>
Expand Down Expand Up @@ -159,7 +159,7 @@ the solution is to split the configuration into two separate firewalls:
],
],
'default' => [
'anonymous' => null,
'anonymous' => 'lazy',
'guard' => [
'authenticators' => [
LoginFormAuthenticator::class,
Expand Down