Package com.io7m.idstore.server.controller.user_pwreset

# 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 Type
  Method
  Description
  `static IdUserPasswordResetServiceType`
  `create(IdServerTelemetryServiceType inTelemetry, IdServerBrandingServiceType inBranding, IdFMTemplateServiceType inTemplates, IdServerMailServiceType inMailService, IdServerConfiguration inConfiguration, IdServerClock inClock, IdDatabaseType inDatabase, IdServerStrings inStrings, IdRateLimitPasswordResetServiceType inRateLimit, IdEventServiceType inEvents)`
  Create a new password reset service.
  `String`
  `description()`
  `void`
  `resetBegin(String sourceHost, String userAgent, UUID requestId, Optional<String> email, Optional<String> userName)`
  Start a password reset.
  `IdToken`
  `resetCheck(String sourceHost, String userAgent, UUID requestId, Optional<String> token)`
  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.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### create

    public static IdUserPasswordResetServiceType create(IdServerTelemetryServiceType inTelemetry, IdServerBrandingServiceType inBranding, IdFMTemplateServiceType inTemplates, IdServerMailServiceType inMailService, IdServerConfiguration inConfiguration, IdServerClock inClock, IdDatabaseType inDatabase, IdServerStrings inStrings, IdRateLimitPasswordResetServiceType inRateLimit, IdEventServiceType inEvents)
    Create a new password reset service.
    Parameters:
      `inTelemetry` - The telemetry service
      `inBranding` - The branding service
      `inTemplates` - The template service
      `inMailService` - The mail service
      `inConfiguration` - The configuration
      `inClock` - The clock service
      `inDatabase` - The database service
      `inStrings` - The string resources
      `inRateLimit` - The rate limit service
      `inEvents` - 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 interface `IdUserPasswordResetServiceType`
    Parameters:
      `sourceHost` - The source remoteHost of the request
      `userAgent` - The user agent
      `requestId` - The request ID
      `email` - The email
      `userName` - The username
    Throws:
      `IdCommandExecutionFailure` - On errors

  - ### description

    public String description()
    Specified by:
      `description` in interface `com.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 interface `IdUserPasswordResetServiceType`
    Parameters:
      `sourceHost` - The source remoteHost of the request
      `userAgent` - The user agent
      `requestId` - The request ID
      `token` - 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 interface `IdUserPasswordResetServiceType`
    Parameters:
      `sourceHost` - The source remoteHost of the request
      `userAgent` - The user agent
      `requestId` - The request ID
      `password0Opt` - The password
      `password1Opt` - The confirmed password
      `tokenOpt` - The reset token
    Throws:
      `IdCommandExecutionFailure` - On errors

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`