Package org.keycloak.authentication
Interface ValidationContext
- 
- All Superinterfaces:
- FormContext
 
 public interface ValidationContext extends FormContext Interface that encapsulates the current validation that is being performed. Calling success() or validationError() sets the status of this current validation.- Version:
- $Revision: 1 $
- Author:
- Bill Burke
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voiderror(String error)voidexcludeOtherErrors()The error messages of this current validation will take precedence over any others.voidsuccess()Mark this validation as sucessfulvoidvalidationError(javax.ws.rs.core.MultivaluedMap<String,String> formData, List<FormMessage> errors)Mark this validation as having a validation error- 
Methods inherited from interface org.keycloak.authentication.FormContextgetAuthenticationSession, getAuthenticatorConfig, getConnection, getEvent, getExecution, getHttpRequest, getRealm, getSession, getUriInfo, getUser, newEvent, setUser
 
- 
 
- 
- 
- 
Method Detail- 
validationErrorvoid validationError(javax.ws.rs.core.MultivaluedMap<String,String> formData, List<FormMessage> errors) Mark this validation as having a validation error- Parameters:
- formData- form data you want to display when the form is refreshed
- errors- error messages to display on the form
 
 - 
errorvoid error(String error) 
 - 
successvoid success() Mark this validation as sucessful
 - 
excludeOtherErrorsvoid excludeOtherErrors() The error messages of this current validation will take precedence over any others. Other error messages will not be shown. This is useful to prevent validation from leaking to an attacker. For example, the recaptcha validator calls this method so that usernames cannot be phished
 
- 
 
-