Class RecoveryCodeValidationAttributes
Object
se.curity.identityserver.sdk.attribute.MapAttributeValue
se.curity.identityserver.sdk.attribute.optinmfa.RecoveryCodeValidationAttributes
- All Implemented Interfaces:
Iterable<Attribute>
,AttributeContainer<MapAttributeValue>
,AttributeOrAttributeValue<AttributeValue>
,AttributeValue
,SerializableAsMap
A recovery code, which may be consumed.
- Since:
- 8.1
-
Nested Class Summary
Nested classes/interfaces inherited from interface se.curity.identityserver.sdk.attribute.AttributeContainer
AttributeContainer.TypeConversionStrategy
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
Creates a recovery code from the given attributes.Creates a recovery code from the given attributes.Methods inherited from class se.curity.identityserver.sdk.attribute.MapAttributeValue
append, append, asMap, delete, empty, equals, get, get, getAll, getAttributesByName, getMandatory, getMandatory, getMandatory, getUniqueValuesOfType, getUniqueValuesOfType, getValue, getValuesOfType, getValuesOfType, getValueWithAuthorities, getValueWithMetadata, hashCode, isEmpty, iterator, keys, map, map, map, mapEntries, mapNonRecursive, nullOrOfType, of, of, of, removeAttributes, removeNullAttributeValues, retainAttributes, size, stream, toString, with, with
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface se.curity.identityserver.sdk.attribute.AttributeContainer
contains, contains, getOptionalValue, getOptionalValue, getOptionalValue, removeAttribute, retainAttribute
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
VALIDATION_INFO
- See Also:
-
CONSUMED_AT
- See Also:
-
-
Method Details
-
of
public static RecoveryCodeValidationAttributes of(String validationInfo, @Nullable Instant consumedAt) Creates a recovery code from the given attributes. The recovery code is consumed whenconsumedAt
parameter is provided.- Parameters:
validationInfo
- the recovery codeconsumedAt
- an optional instant, in seconds from EPOCH, at which the recovery code was consumed- Returns:
- a recovery code from the given attributes
-
of
Creates a recovery code from the given attributes. The recovery code is consumed whenCONSUMED_AT
attribute is provided.- Parameters:
attributes
- the attributes to create the recovery code from.VALIDATION_INFO
attribute is mandatory- Returns:
- a recovery code from the given attributes
-
getValidationInfo
- Returns:
- the recovery code.
-
getConsumedAt
- Returns:
- the instant, in seconds from EPOCH, at which the recovery code was consumed, null otherwise.
-
isConsumed
public boolean isConsumed()- Returns:
- true if this recovery code was consumed, false otherwise.
-