Class EmailExistsAsUsernameValidator

java.lang.Object
org.keycloak.userprofile.validator.EmailExistsAsUsernameValidator
All Implemented Interfaces:
Provider, ProviderFactory<Validator>, SimpleValidator, Validator, ValidatorFactory

public class EmailExistsAsUsernameValidator extends Object implements SimpleValidator
Validator to check User Profile email duplication conditions if isDuplicateEmailsAllowed is false but isRegistrationEmailAsUsername is true. Expects List of Strings as input.
Author:
Vlastimil Elias <velias@redhat.com>
  • Field Details

  • Constructor Details

    • EmailExistsAsUsernameValidator

      public EmailExistsAsUsernameValidator()
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface ProviderFactory<Validator>
    • validate

      public ValidationContext validate(Object input, String inputHint, ValidationContext context, ValidatorConfig config)
      Description copied from interface: Validator
      Validates the given input with an additional inputHint and config.
      Specified by:
      validate in interface Validator
      Parameters:
      input - the value to validate
      inputHint - an optional input hint to guide the validation
      context - the validation context
      config - parameterization for the current validation
      Returns:
      the validation context with the outcome of the validation