Interface AuthenticationManagement
@Service public interface AuthenticationManagement
Application component for authentication related use cases.
- Author:
- Oliver Gierke
-
Method Summary
Modifier and Type Method Description Optional<UserAccount>getCurrentUser()Returns theUserAccountof the currently logged in user orOptional.empty()if no-one is currently logged in.booleanmatches(Password.UnencryptedPassword candidate, Password.EncryptedPassword existing)Returns whether the given candidatePasswordmatches the given existing one.
-
Method Details
-
getCurrentUser
Optional<UserAccount> getCurrentUser()Returns theUserAccountof the currently logged in user orOptional.empty()if no-one is currently logged in.- Returns:
-
matches
Returns whether the given candidatePasswordmatches the given existing one.- Parameters:
candidate- can be null.existing- must not be null.- Returns:
-