Package com.exedio.cope.pattern
Class PasswordRecovery
java.lang.Object
com.exedio.cope.Feature
com.exedio.cope.Pattern
com.exedio.cope.pattern.PasswordRecovery
- All Implemented Interfaces:
Serializable
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
static final class
-
Constructor Summary
ConstructorsConstructorDescriptionPasswordRecovery
(Hash password) PasswordRecovery
(HashInterface password) PasswordRecovery
(HashInterface password, SecureRandom random) PasswordRecovery
(Hash password, SecureRandom random) -
Method Summary
Modifier and TypeMethodDescriptionPartOf<?>
getValidToken
(Item item, long secret) Deprecated.issue
(Item item, PasswordRecovery.Config config) protected void
onMount()
Here you can do additional initialization not yet done in the constructor.int
purge
(Interrupter interrupter) Deprecated.Usepurge(JobContext)
instead.void
purge
(JobContext ctx) int
purge
(Class<?> parentClass, Interrupter interrupter) Deprecated.Usepurge(com.exedio.cope.util.Interrupter)
instead.Methods inherited from class com.exedio.cope.Pattern
addSource, addSource, addSource, addSource, addSourceFeature, addSourceFeature, addSourceFeature, annotationField, equals, getGeneratedTypes, getSourceFeatures, getSourceFeaturesGather, getSourceFields, getSources, getSourceTypes, getType, hashCode, initialize, newSourceType, newSourceType, newSourceType, newSourceType, newSourceType, newSourceType, newType, newType, registerSource
Methods inherited from class com.exedio.cope.Feature
afterModelCreated, getAbstractType, getAnnotation, getID, getLocalizationKeys, getName, getPattern, isAnnotationPresent, isSourceAlready, mount, readResolve, requireMounted, toString, toString, writeReplace
-
Constructor Details
-
PasswordRecovery
-
PasswordRecovery
-
PasswordRecovery
-
PasswordRecovery
-
-
Method Details
-
onMount
protected void onMount()Description copied from class:Pattern
Here you can do additional initialization not yet done in the constructor. In this method you can call methodsPattern.getType()
andFeature.getName()
for the first time. -
getPassword
-
getParent
-
getTokens
-
getSecret
-
getExpires
-
getTokenType
-
issue
@Nonnull public PasswordRecovery.Token issue(@Nonnull Item item, @Nonnull PasswordRecovery.Config config) - Returns:
- a valid token for password recovery
-
getValidToken
- Parameters:
secret
- a secret for password recovery- Returns:
- a valid token, if existing, otherwise null
-
redeem
- Parameters:
secret
- a secret for password recovery- Returns:
- a new password, if the secret was valid, otherwise null
-
purge
-
purge
Deprecated.Usepurge(com.exedio.cope.util.Interrupter)
instead. -
purge
Deprecated.Usepurge(JobContext)
instead. -
issue
Deprecated.Useissue(Item, Config)
instead.- Returns:
- a valid token for password recovery
-
issue(Item, Config)
instead.