Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.2k
Improved code of custom authentication provider cookbook article#2614
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Improved code of custom authentication provider cookbook article#2614
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -233,6 +238,10 @@ the ``PasswordDigest`` header value matches with the user's password. | |||
if (file_exists($this->cacheDir.'/'.$nonce) && file_get_contents($this->cacheDir.'/'.$nonce) + 300 > time()) { | |||
throw new NonceExpiredException('Previously used nonce detected'); | |||
} | |||
// If cache directory does not exist we create it | |||
if ( !is_dir($this->cacheDir) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
you have to remove the spaces between()
@@ -138,7 +138,7 @@ set an authenticated token in the security context if successful. | |||
try { | |||
$authToken = $this->authenticationManager->authenticate($token); | |||
$this->securityContext->setToken($authToken); | |||
return$this->securityContext->setToken($authToken); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
setToken
does not return anything so this is misleading. You should put areturn;
statement after it instead.
…on_providerImproved code of custom authentication provider cookbook article
Merged, thanks for your updates! |
Improved source code of the article. Empty security Token and file_put_contents errors resolved.