Class ActivationResult
Object
se.curity.identityserver.sdk.authentication.ActivationResult
This class represents the state of activation tasks. If the result is Pending or Done a username
will exist in the result. If the state is failed, the username may be null.
- Since:
- 2.1.0
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ActivationResultactivationDone(String username) Create an activation completed result with a given user.static ActivationResultactivationDone(String username, Map<String, Object> model) Create an activation completed result with a given user and additional response model parameters.static ActivationResultAn activation result for a failed activation, no user will be present.static ActivationResultactivationPending(String username) Create an activation pending result with a given user.static ActivationResultactivationPending(String username, Map<String, Object> model) Create an activation pending result with a given user and additional response model parameters.getModel()getState()Get the state of the activation.The username that was activated or is pending.booleanisDone()The activation is completed.booleanisFailed()The activation failed for some reason, typically the session or token had expired.booleanThe activation is still pending.
-
Method Details
-
getModel
-
getState
Get the state of the activation.- Returns:
- an ActivationState for this activation
-
isDone
public boolean isDone()The activation is completed.- Returns:
- true if the activation is completed
-
isPending
public boolean isPending()The activation is still pending. This is typically the result after the initializeActivation call where an out of band process has been initiated.- Returns:
- true if the activation is in pending mode
-
isFailed
public boolean isFailed()The activation failed for some reason, typically the session or token had expired.- Returns:
- true if the activation failed
-
getUsername
The username that was activated or is pending.- Returns:
- a non null username if activation was pending or is done, but username may be null if activation failed.
-
activationPending
Create an activation pending result with a given user.- Parameters:
username- A non-null username that the activation is pending for- Returns:
- an ActivationResult with the state ACTIVATION_PENDING
-
activationPending
Create an activation pending result with a given user and additional response model parameters.- Parameters:
username- A non-null username that the activation is pending formodel- response model parameters given by the activator that should be added to the response view model- Returns:
- an ActivationResult with the state ACTIVATION_PENDING
-
activationDone
Create an activation completed result with a given user.- Parameters:
username- A non-null username that the activation is completed for- Returns:
- an ActivationResult with the state ACTIVATION_DONE
-
activationDone
Create an activation completed result with a given user and additional response model parameters.- Parameters:
username- A non-null username that the activation is completed formodel- response model parameters given by the activator that should be added to the response view model- Returns:
- an ActivationResult with the state ACTIVATION_DONE
-
activationFailed
An activation result for a failed activation, no user will be present.- Returns:
- an ActivationResult with the state ACTIVATION_FAILED
-