Class EmailCooldownManager
java.lang.Object
org.keycloak.authentication.requiredactions.util.EmailCooldownManager
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddCooldownEntry(RequiredActionContext context, String keyPrefix) static booleanaddCooldownEntryIfAbsent(AuthenticationFlowContext context, String keyPrefix, String id) Adds a cooldown entry for the id if there isn't one yet.static ProviderConfigPropertystatic StringgetHashedCacheKey(String keyPrefix, String id) static LongretrieveCooldownEntry(RequiredActionContext context, String keyPrefix)
-
Field Details
-
EMAIL_RESEND_COOLDOWN_SECONDS
- See Also:
-
EMAIL_RESEND_COOLDOWN_DEFAULT_SECONDS
public static final int EMAIL_RESEND_COOLDOWN_DEFAULT_SECONDS- See Also:
-
-
Constructor Details
-
EmailCooldownManager
public EmailCooldownManager()
-
-
Method Details
-
retrieveCooldownEntry
-
addCooldownEntry
-
addCooldownEntryIfAbsent
public static boolean addCooldownEntryIfAbsent(AuthenticationFlowContext context, String keyPrefix, String id) Adds a cooldown entry for the id if there isn't one yet. The check and the add happen in one call, so two requests at the same time can't both get through.- Returns:
- false if the id is still in cooldown
-
getHashedCacheKey
-
createCooldownConfigProperty
-