Package com.io7m.idstore.server.internal

# Class IdUserPasswordResetService

java.lang.Object
com.io7m.idstore.server.internal.IdUserPasswordResetService

All Implemented Interfaces:
  `IdServiceType`

public final class IdUserPasswordResetService extends Object implements IdServiceType
The user password reset service.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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.
  `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 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 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
    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 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 `IdServiceType`
    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 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
    Confirm a password reset.
    Parameters:
      `sourceHost` - The source host 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`