Skip to content

'JavaWebSecurity' task completed#658

Open
itzRoma wants to merge 2 commits into
mate-academy:masterfrom
itzRoma:java-web-security_solution
Open

'JavaWebSecurity' task completed#658
itzRoma wants to merge 2 commits into
mate-academy:masterfrom
itzRoma:java-web-security_solution

Conversation

@itzRoma
Copy link
Copy Markdown

@itzRoma itzRoma commented Jul 5, 2023

No description provided.

Comment on lines +16 to +26
Optional<Driver> driver = driverService.findByLogin(login);
if (driver.isEmpty()) {
throw new AuthenticationException("Invalid login or password"); // invalid login
}

Driver actualDriver = driver.get();
if (!actualDriver.getPassword().equals(password)) {
throw new AuthenticationException("Invalid login or password"); // invalid password
}

return actualDriver;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see common mistakes

@itzRoma itzRoma requested a review from aaananas July 5, 2023 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants