Flag of Ukraine
SymfonyCasts stands united with the people of Ukraine
Next Chapter

Challenge #1 of 1


Q: 

Check out this code in our authenticator:

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

    if ($email === 'ryan@symfonycasts.com') {
        throw new UserNotFoundException('Get outta here Ryan!');
    }

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

public function onAuthenticationFailure(Request $request, AuthenticationException $exception): Response
{
    dd($exception);
}

If I try to login as ryan@symfonycasts.com, what type of object will be dumped inside onAuthenticationFailure()? And if we redirected to /login and rendered that error, what text would be displayed?

userVoice