Package com.io7m.idstore.server.internal
Class IdUserPasswordResetService
java.lang.Object
com.io7m.idstore.server.internal.IdUserPasswordResetService
- All Implemented Interfaces:
IdServiceType
The user password reset service.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IdUserPasswordResetServicecreate(IdServerTelemetryService inTelemetry, IdServerBrandingService inBranding, IdFMTemplateService inTemplates, IdServerMailService inMailService, IdServerConfiguration inConfiguration, IdServerClock inClock, IdDatabaseType inDatabase, IdServerStrings inStrings, IdRateLimitPasswordResetService inRateLimit) Create a new password reset service.voidresetBegin(String sourceHost, String userAgent, UUID requestId, Optional<String> email, Optional<String> userName) Start a password reset.Check a password reset token.voidresetConfirm(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 IdUserPasswordResetService create(IdServerTelemetryService inTelemetry, IdServerBrandingService inBranding, IdFMTemplateService inTemplates, IdServerMailService inMailService, IdServerConfiguration inConfiguration, IdServerClock inClock, IdDatabaseType inDatabase, IdServerStrings inStrings, IdRateLimitPasswordResetService inRateLimit) 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 service- Returns:
- A password reset service
-
resetBegin
public void resetBegin(String sourceHost, String userAgent, UUID requestId, Optional<String> email, Optional<String> userName) throws IdCommandExecutionFailure Start a password reset.- Parameters:
sourceHost- The source host of the requestuserAgent- The user agentrequestId- The request IDemail- The emailuserName- The username- Throws:
IdCommandExecutionFailure- On errors
-
description
- Specified by:
descriptionin interfaceIdServiceType- Returns:
- The service description
-
resetCheck
public IdToken resetCheck(String sourceHost, String userAgent, UUID requestId, Optional<String> token) throws IdCommandExecutionFailure Check a password reset token.- Parameters:
sourceHost- The source host 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 Confirm a password reset.- Parameters:
sourceHost- The source host of the requestuserAgent- The user agentrequestId- The request IDpassword0Opt- The passwordpassword1Opt- The confirmed passwordtokenOpt- The reset token- Throws:
IdCommandExecutionFailure- On errors
-
toString
-