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 givenusername
andpassword
.void
logout
(LoggedUser user) Logs out the given inputuser
.
-
Method Details
-
login
Logs in with the givenusername
andpassword
.- Parameters:
username
-password
-- Returns:
- an
Optional
of a user when login succeeds
-
login
Logs in with the givenusername
.- Parameters:
username
-- Returns:
- an
Optional
of 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
-