2015-07-17 11:45:43 +00:00
|
|
|
package org.keycloak.authentication;
|
|
|
|
|
|
|
|
import org.keycloak.provider.Provider;
|
|
|
|
|
|
|
|
/**
|
2015-08-09 19:06:24 +00:00
|
|
|
* RequiredAction provider. Required actions are one-time actions that a user must perform before they are logged in.
|
|
|
|
*
|
2015-07-17 11:45:43 +00:00
|
|
|
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
|
|
|
* @version $Revision: 1 $
|
|
|
|
*/
|
|
|
|
public interface RequiredActionProvider extends Provider {
|
2015-08-09 19:06:24 +00:00
|
|
|
/**
|
|
|
|
* Called every time a uesr 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.
|
|
|
|
*
|
|
|
|
* @param context
|
|
|
|
*/
|
2015-07-17 11:45:43 +00:00
|
|
|
void evaluateTriggers(RequiredActionContext context);
|
2015-08-09 19:06:24 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* @param context
|
|
|
|
* @return
|
|
|
|
*/
|
2015-08-11 17:04:40 +00:00
|
|
|
void requiredActionChallenge(RequiredActionContext context);
|
2015-08-09 19:06:24 +00:00
|
|
|
|
|
|
|
/**
|
2015-08-11 17:04:40 +00:00
|
|
|
* Called when a required action has form input you want to process.
|
2015-08-09 19:06:24 +00:00
|
|
|
*
|
|
|
|
* @param context
|
|
|
|
*/
|
2015-08-11 17:04:40 +00:00
|
|
|
void processAction(RequiredActionContext context);
|
2015-07-17 11:45:43 +00:00
|
|
|
}
|