Package org.keycloak.validate
Class Validators
- java.lang.Object
-
- org.keycloak.validate.Validators
-
-
Constructor Summary
Constructors Constructor Description Validators(KeycloakSession session)
Creates a newValidators
instance with the givenKeycloakSession
.
-
Method Summary
-
-
-
Constructor Detail
-
Validators
public Validators(KeycloakSession session)
Creates a newValidators
instance with the givenKeycloakSession
.- Parameters:
session
-
-
-
Method Detail
-
validator
public Validator validator(String id)
Look-up for a built-in or registeredValidator
with the given providerid
.- Parameters:
id
-- Returns:
- See Also:
validator(KeycloakSession, String)
-
validatorFactory
public ValidatorFactory validatorFactory(String id)
Look-up for a built-in or registeredValidatorFactory
with the given providerid
.- Parameters:
id
-- Returns:
- See Also:
validatorFactory(KeycloakSession, String)
-
validateConfig
public ValidationResult validateConfig(String id, ValidatorConfig config)
- Parameters:
id
-config
-- Returns:
- See Also:
validateConfig(KeycloakSession, String, ValidatorConfig)
-
getInternalValidatorFactoryById
public static ValidatorFactory getInternalValidatorFactoryById(String id)
-
notBlankValidator
public static NotBlankValidator notBlankValidator()
-
notEmptyValidator
public static NotEmptyValidator notEmptyValidator()
-
lengthValidator
public static LengthValidator lengthValidator()
-
uriValidator
public static UriValidator uriValidator()
-
emailValidator
public static EmailValidator emailValidator()
-
patternValidator
public static PatternValidator patternValidator()
-
doubleValidator
public static DoubleValidator doubleValidator()
-
integerValidator
public static IntegerValidator integerValidator()
-
dateValidator
public static LocalDateValidator dateValidator()
-
optionsValidator
public static OptionsValidator optionsValidator()
-
validatorConfigValidator
public static ValidatorConfigValidator validatorConfigValidator()
-
validator
public static Validator validator(KeycloakSession session, String id)
Look-up up for a built-in or registeredValidator
with the given validatorId.- Parameters:
session
- theKeycloakSession
id
- the id of the validator- Returns:
- the
Validator
or null
-
validatorFactory
public static ValidatorFactory validatorFactory(KeycloakSession session, String id)
Look-up for a built-in or registeredValidatorFactory
with the given validatorId.This is intended for users who want to dynamically create new
Validator
instances, validateValidatorConfig
configurations or create default configurations for aValidator
.- Parameters:
session
- theKeycloakSession
id
- the id of the validator- Returns:
- the
Validator
or null
-
validateConfig
public static ValidationResult validateConfig(KeycloakSession session, String id, ValidatorConfig config)
- Parameters:
session
-id
- of the validatorconfig
- to be validated- Returns:
-
-