Package restapi.utils.security.auth
Interface UserAuthenticationService
- All Known Implementing Classes:
TokenAuthenticationService
public interface UserAuthenticationService
-
Method Summary
Modifier and TypeMethodDescriptionfindByToken(String token) Finds a user by its dao-key.Logs in with the givenusername.Logs in with the givenusernameandpassword.voidlogout(LoggedUser user) Logs out the given inputuser.
-
Method Details
-
login
Logs in with the givenusernameandpassword.- Parameters:
username-password-- Returns:
- an
Optionalof a user when login succeeds
-
login
Logs in with the givenusername.- Parameters:
username-- Returns:
- an
Optionalof a user when login succeeds
-
findByToken
Finds a user by its dao-key.- Parameters:
token- user dao key- Returns:
-
logout
Logs out the given inputuser.- Parameters:
user- the user to logout
-