File tree Expand file tree Collapse file tree 5 files changed +26
-9
lines changed
Bundle/FrameworkBundle/Templating Expand file tree Collapse file tree 5 files changed +26
-9
lines changed Original file line number Diff line number Diff line change @@ -643,3 +643,25 @@ FrameworkBundle
643
643
}
644
644
}
645
645
```
646
+
647
+ Security
648
+ ---------------
649
+
650
+ * Injection of the ` security.context ` service has been reduced to a bare minimum. This means
651
+ that arguments that once hinted ` SecurityContext ` or ` SecurityContextInterface ` will have
652
+ to be updated accordingly to either the ` TokenStorageInterface ` or ` AuthorizationCheckerInterface ` .
653
+ The following classes now require the ` security.token_storage ` service instead of the ` security.context ` ,
654
+ please update your extending implementations accordingly.
655
+
656
+ * ` AbstractAuthenticationListener `
657
+ * ` AnonymousAuthenticationListener `
658
+ * ` ContextListener `
659
+ * ` SimplePreAuthenticationListener `
660
+ * ` X509AuthenticationListener `
661
+ * ` RemoteUserAuthenticationListener `
662
+ * ` BasicAuthenticationListener `
663
+ * ` DigestAuthenticationListener `
664
+ * ` ExceptionListener `
665
+ * ` SwitchUserListener `
666
+ * ` AccessListener `
667
+ * ` RememberMeListener `
Original file line number Diff line number Diff line change 14
14
use Symfony \Component \DependencyInjection \ContainerInterface ;
15
15
use Symfony \Component \HttpFoundation \Request ;
16
16
use Symfony \Component \HttpFoundation \Session \Session ;
17
- use Symfony \Component \Security \Core \Authentication \Token \TokenInterface ;
18
17
use Symfony \Component \Security \Core \SecurityContext ;
19
18
20
19
/**
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ public function handle(GetResponseEvent $event)
101
101
}
102
102
103
103
/**
104
- * Writes the SecurityContext to the session.
104
+ * Writes the security token into the session.
105
105
*
106
106
* @param FilterResponseEvent $event A FilterResponseEvent instance
107
107
*/
@@ -121,10 +121,6 @@ public function onKernelResponse(FilterResponseEvent $event)
121
121
$ request = $ event ->getRequest ();
122
122
$ session = $ request ->getSession ();
123
123
124
- if (null === $ session ) {
125
- return ;
126
- }
127
-
128
124
if ((null === $ token = $ this ->tokenStorage ->getToken ()) || ($ token instanceof AnonymousToken)) {
129
125
if ($ request ->hasPreviousSession ()) {
130
126
$ session ->remove ($ this ->sessionKey );
Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ interface RememberMeServicesInterface
36
36
const COOKIE_ATTR_NAME = '_security_remember_me_cookie ' ;
37
37
38
38
/**
39
- * This method will be called whenever the SecurityContext does not contain
40
- * an TokenInterface object and the framework wishes to provide an implementation
39
+ * This method will be called whenever the TokenStorage does not contain
40
+ * a TokenInterface object and the framework wishes to provide an implementation
41
41
* with an opportunity to authenticate the request using remember-me capabilities.
42
42
*
43
43
* No attempt whatsoever is made to determine whether the browser has requested
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ interface SessionAuthenticationStrategyInterface
27
27
/**
28
28
* This performs any necessary changes to the session.
29
29
*
30
- * This method is called before the SecurityContext is populated with a
30
+ * This method is called before the TokenStorage is populated with a
31
31
* Token, and only by classes inheriting from AbstractAuthenticationListener.
32
32
*
33
33
* @param Request $request
You can’t perform that action at this time.
0 commit comments