Class IdUserLoginService
java.lang.Object
com.io7m.idstore.server.controller.user.IdUserLoginService
- All Implemented Interfaces:
com.io7m.repetoir.core.RPServiceType
public final class IdUserLoginService
extends Object
implements com.io7m.repetoir.core.RPServiceType
A service that handles the logic for user logins.
-
Constructor Summary
ConstructorDescriptionIdUserLoginService
(IdServerClock inClock, IdStrings inStrings, IdSessionUserService inSessions, IdServerConfigurationService inConfigurations, IdRateLimitUserLoginServiceType inRateLimit, IdEventServiceType inEvents) A service that handles the logic for user logins. -
Method Summary
-
Constructor Details
-
IdUserLoginService
public IdUserLoginService(IdServerClock inClock, IdStrings inStrings, IdSessionUserService inSessions, IdServerConfigurationService inConfigurations, IdRateLimitUserLoginServiceType inRateLimit, IdEventServiceType inEvents) A service that handles the logic for user logins.- Parameters:
inClock
- The clockinStrings
- The string resourcesinSessions
- A session serviceinConfigurations
- A configuration serviceinRateLimit
- The rate limitinEvents
- The event service
-
-
Method Details
-
userLogin
public IdUserLoggedIn userLogin(IdDatabaseTransactionType transaction, UUID requestId, String remoteHost, String username, String password, Map<String, String> metadata) throws IdCommandExecutionFailureTry logging in. Create a new session if logging in succeeds, or raise an exception if the login cannot proceed for any reason (invalid credentials, banned user, etc).- Parameters:
transaction
- A database transactionrequestId
- The ID of the requestremoteHost
- The remote remoteHostusername
- The usernamepassword
- The passwordmetadata
- The request metadata- Returns:
- A login record
- Throws:
IdCommandExecutionFailure
- On errors
-
description
- Specified by:
description
in interfacecom.io7m.repetoir.core.RPServiceType
-
toString
-