Class UpdateEmail
- java.lang.Object
- 
- org.keycloak.authentication.requiredactions.UpdateEmail
 
- 
- All Implemented Interfaces:
- RequiredActionFactory,- RequiredActionProvider,- EnvironmentDependentProviderFactory,- Provider,- ProviderFactory<RequiredActionProvider>
 
 public class UpdateEmail extends Object implements RequiredActionProvider, RequiredActionFactory, EnvironmentDependentProviderFactory 
- 
- 
Constructor SummaryConstructors Constructor Description UpdateEmail()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()This is called when the server shuts down.RequiredActionProvidercreate(KeycloakSession session)voidevaluateTriggers(RequiredActionContext context)Called every time a user authenticates.StringgetDisplayText()Display text used in admin console to reference this required actionStringgetId()voidinit(Config.Scope config)Only called once when the factory is first created.InitiatedActionSupportinitiatedActionSupport()Determines what type of support is provided for application-initiated actions.booleanisSupported()voidpostInit(KeycloakSessionFactory factory)Called after all provider factories have been initializedvoidprocessAction(RequiredActionContext context)Called when a required action has form input you want to process.voidrequiredActionChallenge(RequiredActionContext context)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.static voidupdateEmailNow(EventBuilder event, UserModel user, UserProfile emailUpdateValidationResult)static UserProfilevalidateEmailUpdate(KeycloakSession session, UserModel user, String newEmail)- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.keycloak.provider.EnvironmentDependentProviderFactoryisSupported
 - 
Methods inherited from interface org.keycloak.provider.ProviderFactorygetConfigMetadata, order
 - 
Methods inherited from interface org.keycloak.authentication.RequiredActionFactoryisOneTimeAction
 - 
Methods inherited from interface org.keycloak.authentication.RequiredActionProvidergetMaxAuthAge, initiatedActionCanceled
 
- 
 
- 
- 
- 
Method Detail- 
initiatedActionSupportpublic InitiatedActionSupport initiatedActionSupport() Description copied from interface:RequiredActionProviderDetermines what type of support is provided for application-initiated actions.- Specified by:
- initiatedActionSupportin interface- RequiredActionProvider
- Returns:
- InititatedActionsSupport
 
 - 
getDisplayTextpublic String getDisplayText() Description copied from interface:RequiredActionFactoryDisplay text used in admin console to reference this required action- Specified by:
- getDisplayTextin interface- RequiredActionFactory
- Returns:
 
 - 
evaluateTriggerspublic void evaluateTriggers(RequiredActionContext context) Description copied from interface:RequiredActionProviderCalled 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:
- evaluateTriggersin interface- RequiredActionProvider
 
 - 
requiredActionChallengepublic void requiredActionChallenge(RequiredActionContext context) Description copied from interface:RequiredActionProviderIf 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:
- requiredActionChallengein interface- RequiredActionProvider
 
 - 
processActionpublic void processAction(RequiredActionContext context) Description copied from interface:RequiredActionProviderCalled when a required action has form input you want to process.- Specified by:
- processActionin interface- RequiredActionProvider
 
 - 
validateEmailUpdatepublic static UserProfile validateEmailUpdate(KeycloakSession session, UserModel user, String newEmail) 
 - 
updateEmailNowpublic static void updateEmailNow(EventBuilder event, UserModel user, UserProfile emailUpdateValidationResult) 
 - 
createpublic RequiredActionProvider create(KeycloakSession session) - Specified by:
- createin interface- ProviderFactory<RequiredActionProvider>
 
 - 
initpublic void init(Config.Scope config) Description copied from interface:ProviderFactoryOnly called once when the factory is first created. This config is pulled from keycloak_server.json- Specified by:
- initin interface- ProviderFactory<RequiredActionProvider>
 
 - 
postInitpublic void postInit(KeycloakSessionFactory factory) Description copied from interface:ProviderFactoryCalled after all provider factories have been initialized- Specified by:
- postInitin interface- ProviderFactory<RequiredActionProvider>
 
 - 
closepublic void close() Description copied from interface:ProviderFactoryThis is called when the server shuts down.- Specified by:
- closein interface- Provider
- Specified by:
- closein interface- ProviderFactory<RequiredActionProvider>
 
 - 
getIdpublic String getId() - Specified by:
- getIdin interface- ProviderFactory<RequiredActionProvider>
 
 - 
isSupportedpublic boolean isSupported() - Specified by:
- isSupportedin interface- EnvironmentDependentProviderFactory
- Returns:
- trueif the provider is supported and should be available,- falseotherwise
 
 
- 
 
-