Class IdUserPasswordResetService
java.lang.Object
com.io7m.idstore.server.controller.user_pwreset.IdUserPasswordResetService
- All Implemented Interfaces:
IdUserPasswordResetServiceType
,com.io7m.repetoir.core.RPServiceType
public final class IdUserPasswordResetService
extends Object
implements IdUserPasswordResetServiceType
The user password reset service.
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(IdServerTelemetryServiceType inTelemetry, IdServerBrandingServiceType inBranding, IdFMTemplateServiceType inTemplates, IdServerMailServiceType inMailService, IdServerConfiguration inConfiguration, IdServerClock inClock, IdDatabaseType inDatabase, IdStrings inStrings, IdRateLimitPasswordResetServiceType inRateLimit, IdEventServiceType inEvents) Create a new password reset service.void
resetBegin
(String sourceHost, String userAgent, UUID requestId, Optional<String> email, Optional<String> userName) Start a password reset.Check a password reset token.void
resetConfirm
(String sourceHost, String userAgent, UUID requestId, Optional<String> password0Opt, Optional<String> password1Opt, Optional<String> tokenOpt) Confirm a password reset.toString()
-
Method Details
-
create
public static IdUserPasswordResetServiceType create(IdServerTelemetryServiceType inTelemetry, IdServerBrandingServiceType inBranding, IdFMTemplateServiceType inTemplates, IdServerMailServiceType inMailService, IdServerConfiguration inConfiguration, IdServerClock inClock, IdDatabaseType inDatabase, IdStrings inStrings, IdRateLimitPasswordResetServiceType inRateLimit, IdEventServiceType inEvents) Create a new password reset service.- Parameters:
inTelemetry
- The telemetry serviceinBranding
- The branding serviceinTemplates
- The template serviceinMailService
- The mail serviceinConfiguration
- The configurationinClock
- The clock serviceinDatabase
- The database serviceinStrings
- The string resourcesinRateLimit
- The rate limit serviceinEvents
- The event service- Returns:
- A password reset service
-
resetBegin
public void resetBegin(String sourceHost, String userAgent, UUID requestId, Optional<String> email, Optional<String> userName) throws IdCommandExecutionFailure Description copied from interface:IdUserPasswordResetServiceType
Start a password reset.- Specified by:
resetBegin
in interfaceIdUserPasswordResetServiceType
- Parameters:
sourceHost
- The source remoteHost of the requestuserAgent
- The user agentrequestId
- The request IDemail
- The emailuserName
- The username- Throws:
IdCommandExecutionFailure
- On errors
-
description
- Specified by:
description
in interfacecom.io7m.repetoir.core.RPServiceType
-
resetCheck
public IdToken resetCheck(String sourceHost, String userAgent, UUID requestId, Optional<String> token) throws IdCommandExecutionFailure Description copied from interface:IdUserPasswordResetServiceType
Check a password reset token.- Specified by:
resetCheck
in interfaceIdUserPasswordResetServiceType
- Parameters:
sourceHost
- The source remoteHost of the requestuserAgent
- The user agentrequestId
- The request IDtoken
- The token- Returns:
- The checked token
- Throws:
IdCommandExecutionFailure
- On errors
-
resetConfirm
public void resetConfirm(String sourceHost, String userAgent, UUID requestId, Optional<String> password0Opt, Optional<String> password1Opt, Optional<String> tokenOpt) throws IdCommandExecutionFailure Description copied from interface:IdUserPasswordResetServiceType
Confirm a password reset.- Specified by:
resetConfirm
in interfaceIdUserPasswordResetServiceType
- Parameters:
sourceHost
- The source remoteHost of the requestuserAgent
- The user agentrequestId
- The request IDpassword0Opt
- The passwordpassword1Opt
- The confirmed passwordtokenOpt
- The reset token- Throws:
IdCommandExecutionFailure
- On errors
-
toString
-