Interface AuthenticationManager
-
@Service public interface AuthenticationManager
Application component for authentication related use cases.- Author:
- Oliver Gierke
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<UserAccount>
getCurrentUser()
Returns theUserAccount
of the currently logged in user orOptional.empty()
if no-one is currently logged in.boolean
matches(Password.UnencryptedPassword candidate, Password.EncryptedPassword existing)
Returns whether the given candidatePassword
matches the given existing one.
-
-
-
Method Detail
-
getCurrentUser
Optional<UserAccount> getCurrentUser()
Returns theUserAccount
of the currently logged in user orOptional.empty()
if no-one is currently logged in.- Returns:
-
matches
boolean matches(Password.UnencryptedPassword candidate, Password.EncryptedPassword existing)
Returns whether the given candidatePassword
matches the given existing one.- Parameters:
candidate
- can be null.existing
- must not be null.- Returns:
-
-