From 0025c0645f5cbdeb1090c883ae5513ca0c8b7ab7 Mon Sep 17 00:00:00 2001 From: Tomas Date: Tue, 18 Aug 2020 10:38:41 +0300 Subject: [PATCH] Fix inconsistent security docs --- security/form_login.rst | 9 +++++---- security/guard_authentication.rst | 9 +++++---- security/json_login_setup.rst | 18 ++++++++++-------- security/multiple_guard_authenticators.rst | 18 ++++++++++-------- 4 files changed, 30 insertions(+), 24 deletions(-) diff --git a/security/form_login.rst b/security/form_login.rst index 4dcd039e347..06d7e22c500 100644 --- a/security/form_login.rst +++ b/security/form_login.rst @@ -28,7 +28,8 @@ First, enable ``form_login`` under your firewall: firewalls: main: - anonymous: lazy + anonymous: true + lazy: true form_login: login_path: login check_path: login @@ -46,8 +47,7 @@ First, enable ``form_login`` under your firewall: https://symfony.com/schema/dic/security/security-1.0.xsd"> - - + @@ -59,7 +59,8 @@ First, enable ``form_login`` under your firewall: $container->loadFromExtension('security', [ 'firewalls' => [ 'main' => [ - 'anonymous' => 'lazy', + 'anonymous' => true, + 'lazy' => true, 'form_login' => [ 'login_path' => 'login', 'check_path' => 'login', diff --git a/security/guard_authentication.rst b/security/guard_authentication.rst index d88bea0de20..9245faace34 100644 --- a/security/guard_authentication.rst +++ b/security/guard_authentication.rst @@ -189,7 +189,8 @@ Finally, configure your ``firewalls`` key in ``security.yaml`` to use this authe # ... main: - anonymous: lazy + anonymous: true + lazy: true logout: ~ guard: @@ -217,8 +218,7 @@ Finally, configure your ``firewalls`` key in ``security.yaml`` to use this authe - - + @@ -241,7 +241,8 @@ Finally, configure your ``firewalls`` key in ``security.yaml`` to use this authe 'firewalls' => [ 'main' => [ 'pattern' => '^/', - 'anonymous' => 'lazy', + 'anonymous' => true, + 'lazy' => true, 'logout' => true, 'guard' => [ 'authenticators' => [ diff --git a/security/json_login_setup.rst b/security/json_login_setup.rst index 44ffa5d02e9..b304286bc30 100644 --- a/security/json_login_setup.rst +++ b/security/json_login_setup.rst @@ -17,7 +17,8 @@ First, enable the JSON login under your firewall: firewalls: main: - anonymous: lazy + anonymous: true + lazy: true json_login: check_path: /login @@ -34,8 +35,7 @@ First, enable the JSON login under your firewall: https://symfony.com/schema/dic/security/security-1.0.xsd"> - - + @@ -47,7 +47,8 @@ First, enable the JSON login under your firewall: $container->loadFromExtension('security', [ 'firewalls' => [ 'main' => [ - 'anonymous' => 'lazy', + 'anonymous' => true, + 'lazy' => true, 'json_login' => [ 'check_path' => '/login', ], @@ -165,7 +166,8 @@ The security configuration should be: firewalls: main: - anonymous: lazy + anonymous: true + lazy: true json_login: check_path: login username_path: security.credentials.login @@ -184,8 +186,7 @@ The security configuration should be: https://symfony.com/schema/dic/security/security-1.0.xsd"> - - + @@ -199,7 +200,8 @@ The security configuration should be: $container->loadFromExtension('security', [ 'firewalls' => [ 'main' => [ - 'anonymous' => 'lazy', + 'anonymous' => true, + 'lazy' => true, 'json_login' => [ 'check_path' => 'login', 'username_path' => 'security.credentials.login', diff --git a/security/multiple_guard_authenticators.rst b/security/multiple_guard_authenticators.rst index d3ef59a2494..b6ea9ca5f11 100644 --- a/security/multiple_guard_authenticators.rst +++ b/security/multiple_guard_authenticators.rst @@ -27,7 +27,8 @@ This is how your security configuration can look in action: # ... firewalls: default: - anonymous: lazy + anonymous: true + lazy: true guard: authenticators: - App\Security\LoginFormAuthenticator @@ -48,8 +49,7 @@ This is how your security configuration can look in action: - - + App\Security\LoginFormAuthenticator App\Security\FacebookConnectAuthenticator @@ -68,7 +68,8 @@ This is how your security configuration can look in action: // ... 'firewalls' => [ 'default' => [ - 'anonymous' => 'lazy', + 'anonymous' => true, + 'lazy' => true, 'guard' => [ 'entry_point' => LoginFormAuthenticator::class, 'authenticators' => [ @@ -105,7 +106,8 @@ the solution is to split the configuration into two separate firewalls: authenticators: - App\Security\ApiTokenAuthenticator default: - anonymous: lazy + anonymous: true + lazy: true guard: authenticators: - App\Security\LoginFormAuthenticator @@ -133,8 +135,7 @@ the solution is to split the configuration into two separate firewalls: App\Security\ApiTokenAuthenticator - - + App\Security\LoginFormAuthenticator @@ -163,7 +164,8 @@ the solution is to split the configuration into two separate firewalls: ], ], 'default' => [ - 'anonymous' => 'lazy', + 'anonymous' => true, + 'lazy' => true, 'guard' => [ 'authenticators' => [ LoginFormAuthenticator::class,