Class ValidatorConfigValidator

java.lang.Object
org.keycloak.validate.validators.ValidatorConfigValidator
All Implemented Interfaces:
Provider, ProviderFactory<Validator>, SimpleValidator, Validator, ValidatorFactory

public class ValidatorConfigValidator extends Object implements SimpleValidator
Validate that input value is ValidatorConfig and it is correct for validator (inputHint must be ID of the validator config is for) by Validators.validateConfig(org.keycloak.models.KeycloakSession, String, ValidatorConfig). .
  • Field Details

    • MESSAGE_CONFIG_MISSING_VALUE

      public static final String MESSAGE_CONFIG_MISSING_VALUE
      Generic error messages for config validations - missing config value
      See Also:
    • MESSAGE_CONFIG_INVALID_VALUE

      public static final String MESSAGE_CONFIG_INVALID_VALUE
      Generic error messages for config validations - invalid config value
      See Also:
    • MESSAGE_CONFIG_INVALID_NUMBER_VALUE

      public static final String MESSAGE_CONFIG_INVALID_NUMBER_VALUE
      Generic error messages for config validations - invalid config value - number expected
      See Also:
    • MESSAGE_CONFIG_INVALID_BOOLEAN_VALUE

      public static final String MESSAGE_CONFIG_INVALID_BOOLEAN_VALUE
      Generic error messages for config validations - invalid config value - boolean expected
      See Also:
    • MESSAGE_CONFIG_INVALID_STRING_VALUE

      public static final String MESSAGE_CONFIG_INVALID_STRING_VALUE
      Generic error messages for config validations - invalid config value - string expected
      See Also:
    • ID

      public static final String ID
      See Also:
    • INSTANCE

      public static final ValidatorConfigValidator INSTANCE
  • 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