Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitf6eec74

Browse files
committed
Merge pull requestsymfony#2835 from alcaeus/ticket_8226
[WCM] Fix example code to reflect changes forsymfony#8226
2 parents3d1f59f +13f57a2 commitf6eec74

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎cookbook/security/custom_authentication_provider.rst‎

Lines 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)

[8]ページ先頭

©2009-2025 Movatter.jp