-
Notifications
You must be signed in to change notification settings - Fork 18
Problem Username could not be found #12
Description
Thank you for your useful Bundle. I followed your documentation about the installation of the CAS client and i think that i misunderstood something.
When I return to my application (after login), I have a message like this :
{"message":"Username could not be found."}
I just created a new Symfony 3.4 project and I did the configuration like in your documentation. So in your CasAuthenticator, I add a var_dump :
`public function getUser($credentials, UserProviderInterface $userProvider){
if (isset($credentials[$this->username_attribute])) {
var_dump($userProvider);
return $userProvider->loadUserByUsername($credentials[$this->username_attribute]);
} else {
return null;
}
}`
And surprise, it returns :
object(Symfony\Component\Security\Core\User\InMemoryUserProvider)#241 (1) {
["users":"Symfony\Component\Security\Core\User\InMemoryUserProvider":private]=>
NULL
}
{"message":"Username could not be found."}
I don't understand why the provider is NULL. For the precision, it's the default userProvider use in your Bundle.
Thank you for your answer.