Class VerifyEmailAccountStage
- java.lang.Object
-
- org.forgerock.selfservice.stages.email.VerifyEmailAccountStage
-
- All Implemented Interfaces:
ProgressStage<VerifyEmailAccountConfig>
public final class VerifyEmailAccountStage extends Object implements ProgressStage<VerifyEmailAccountConfig>
Having retrieved the email address from the context or in response to the initial requirements, verifies the validity of the email address with the user who submitted the requirements via an email flow.- Since:
- 0.1.0
-
-
Constructor Summary
Constructors Constructor Description VerifyEmailAccountStage(ConnectionFactory connectionFactory, EmailVerificationWhitelist whitelist, ExecutorService executorService)
Constructs a new stage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StageResponse
advance(ProcessContext context, VerifyEmailAccountConfig config)
Advance the progress stage.JsonValue
gatherInitialRequirements(ProcessContext context, VerifyEmailAccountConfig config)
Response for defining any initial requirements the stage may have.
-
-
-
Constructor Detail
-
VerifyEmailAccountStage
@Inject public VerifyEmailAccountStage(ConnectionFactory connectionFactory, EmailVerificationWhitelist whitelist, ExecutorService executorService)
Constructs a new stage.- Parameters:
connectionFactory
- the CREST connection factorywhitelist
- an EmailVerificationWhitelist strategyexecutorService
- an executor for asynchronous email sending
-
-
Method Detail
-
gatherInitialRequirements
public JsonValue gatherInitialRequirements(ProcessContext context, VerifyEmailAccountConfig config) throws BadRequestException
Description copied from interface:ProgressStage
Response for defining any initial requirements the stage may have.An empty json object implies no initial requirements.
- Specified by:
gatherInitialRequirements
in interfaceProgressStage<VerifyEmailAccountConfig>
- Parameters:
context
- the current process contextconfig
- the stage configuration- Returns:
- json value representing the requirements or empty json object for no requirements
- Throws:
BadRequestException
-
advance
public StageResponse advance(ProcessContext context, VerifyEmailAccountConfig config) throws ResourceException
Description copied from interface:ProgressStage
Advance the progress stage.- Specified by:
advance
in interfaceProgressStage<VerifyEmailAccountConfig>
- Parameters:
context
- the current process contextconfig
- the stage configuration- Returns:
- the result of invoking this stage
- Throws:
ResourceException
- if some expected state or input is invalid
-
-