Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f6eec74

Browse filesBrowse files
committed
Merge pull request symfony#2835 from alcaeus/ticket_8226
[WCM] Fix example code to reflect changes for symfony#8226
2 parents 3d1f59f + 13f57a2 commit f6eec74
Copy full SHA for f6eec74

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed

‎cookbook/security/custom_authentication_provider.rst

Copy file name to clipboardExpand all lines: cookbook/security/custom_authentication_provider.rst
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,11 @@ set an authenticated token in the security context if successful.
144144
// ... you might log something here
145145
146146
// To deny the authentication clear the token. This will redirect to the login page.
147-
// $this->securityContext->setToken(null);
147+
// Make sure to only clear your token, not those of other authentication listeners.
148+
// $token = $this->securityContext->getToken();
149+
// if ($token instanceof WsseUserToken && $this->providerKey === $token->getProviderKey()) {
150+
// $this->securityContext->setToken(null);
151+
// }
148152
// return;
149153
150154
// Deny authentication with a '403 Forbidden' HTTP response

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.