Class UpdatePassword
java.lang.Object
org.keycloak.authentication.requiredactions.UpdatePassword
- All Implemented Interfaces:
RequiredActionFactory
,RequiredActionProvider
,Provider
,ProviderFactory<RequiredActionProvider>
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
This is called when the server shuts down.create
(KeycloakSession session) void
evaluateTriggers
(RequiredActionContext context) Called every time a user authenticates.Returns the metadata for each configuration property supported by this factory.Display text used in admin console to reference this required actiongetId()
int
Defines the max time after a user login, after which re-authentication is requested for an AIA.void
init
(Config.Scope config) Only called once when the factory is first created.Determines what type of support is provided for application-initiated actions.boolean
Flag indicating whether the execution of the required action by the same circumstances (e.g.void
postInit
(KeycloakSessionFactory factory) Called after all provider factories have been initializedvoid
processAction
(RequiredActionContext context) Called when a required action has form input you want to process.void
If the user has a required action set, this method will be the initial call to obtain what to display to the user's browser.void
validateConfig
(KeycloakSession session, RealmModel realm, RequiredActionConfigModel model) Allows users to validate the provided configuration for this required action.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.keycloak.provider.ProviderFactory
dependsOn, order
Methods inherited from interface org.keycloak.authentication.RequiredActionFactory
isConfigurable
Methods inherited from interface org.keycloak.authentication.RequiredActionProvider
initiatedActionCanceled
-
Field Details
-
MAX_AUTH_AGE_KEY
- See Also:
-
-
Constructor Details
-
UpdatePassword
Deprecated.useUpdatePassword(KeycloakSession)
instead -
UpdatePassword
-
-
Method Details
-
initiatedActionSupport
Description copied from interface:RequiredActionProvider
Determines what type of support is provided for application-initiated actions.- Specified by:
initiatedActionSupport
in interfaceRequiredActionProvider
- Returns:
- InititatedActionsSupport
-
evaluateTriggers
Description copied from interface:RequiredActionProvider
Called every time a user authenticates. This checks to see if this required action should be triggered. The implementation of this method is responsible for setting the required action on the UserModel. For example, the UpdatePassword required actions checks the password policies to see if the password has expired.- Specified by:
evaluateTriggers
in interfaceRequiredActionProvider
-
requiredActionChallenge
Description copied from interface:RequiredActionProvider
If the user has a required action set, this method will be the initial call to obtain what to display to the user's browser. Return null if no action should be done.- Specified by:
requiredActionChallenge
in interfaceRequiredActionProvider
-
processAction
Description copied from interface:RequiredActionProvider
Called when a required action has form input you want to process.- Specified by:
processAction
in interfaceRequiredActionProvider
-
close
public void close()Description copied from interface:ProviderFactory
This is called when the server shuts down.- Specified by:
close
in interfaceProvider
- Specified by:
close
in interfaceProviderFactory<RequiredActionProvider>
-
create
- Specified by:
create
in interfaceProviderFactory<RequiredActionProvider>
-
init
Description copied from interface:ProviderFactory
Only called once when the factory is first created. This config is pulled from keycloak_server.json- Specified by:
init
in interfaceProviderFactory<RequiredActionProvider>
-
postInit
Description copied from interface:ProviderFactory
Called after all provider factories have been initialized- Specified by:
postInit
in interfaceProviderFactory<RequiredActionProvider>
-
getDisplayText
Description copied from interface:RequiredActionFactory
Display text used in admin console to reference this required action- Specified by:
getDisplayText
in interfaceRequiredActionFactory
- Returns:
-
getId
- Specified by:
getId
in interfaceProviderFactory<RequiredActionProvider>
-
isOneTimeAction
public boolean isOneTimeAction()Description copied from interface:RequiredActionFactory
Flag indicating whether the execution of the required action by the same circumstances (e.g. by one and the same action token) should only be permitted once.- Specified by:
isOneTimeAction
in interfaceRequiredActionFactory
- Returns:
-
getMaxAuthAge
public int getMaxAuthAge()Description copied from interface:RequiredActionProvider
Defines the max time after a user login, after which re-authentication is requested for an AIA. 0 means that re-authentication is always requested.- Specified by:
getMaxAuthAge
in interfaceRequiredActionProvider
-
getConfigMetadata
Description copied from interface:ProviderFactory
Returns the metadata for each configuration property supported by this factory.- Specified by:
getConfigMetadata
in interfaceProviderFactory<RequiredActionProvider>
- Returns:
- a list with the metadata for each configuration property supported by this factory
-
validateConfig
public void validateConfig(KeycloakSession session, RealmModel realm, RequiredActionConfigModel model) Description copied from interface:RequiredActionFactory
Allows users to validate the provided configuration for this required action. Users can throw aModelValidationException
to indicate that the configuration is invalid.- Specified by:
validateConfig
in interfaceRequiredActionFactory
-
UpdatePassword(KeycloakSession)
instead