Symfony 5 Security: Authenticators
Hashing Plain Passwords & PasswordCredentials
  Start your All-Access Pass to unlock this challenge
Buy Access Login

Challenge 1 / 1

I've created a custom authenticator and need to check to make sure the user's password is correct. Here is the authenticate() method:

public function authenticate(Request $request): PassportInterface
{
    $email = $request->request->get('email');
    $password = $request->request->get('password');

    return new Passport(
        new UserBadge($email),
        new PasswordCredentials($password)
    );
}

Will this correctly validate the user's password?

Skip challenges and go to theNext Chapter

Turn Challenges Off?

All further challenges will be skipped automatically.
You can re-enable challenges at any time on this page or from your account page.