Package org.keycloak.validate
Interface Validator
- All Superinterfaces:
Provider
- All Known Subinterfaces:
SimpleValidator
- All Known Implementing Classes:
AbstractNumberValidator
,AbstractSimpleValidator
,AbstractStringValidator
,AttributeRequiredByMetadataValidator
,BlankAttributeValidator
,BrokeringFederatedUsernameHasValueValidator
,DoubleValidator
,DuplicateEmailValidator
,DuplicateUsernameValidator
,EmailExistsAsUsernameValidator
,EmailValidator
,ImmutableAttributeValidator
,IntegerValidator
,LengthValidator
,LocalDateValidator
,NotBlankValidator
,NotEmptyValidator
,OptionsValidator
,PatternValidator
,PersonNameProhibitedCharactersValidator
,ReadOnlyAttributeUnchangedValidator
,RegistrationEmailAsUsernameEmailValueValidator
,RegistrationEmailAsUsernameUsernameValueValidator
,RegistrationUsernameExistsValidator
,UriValidator
,UsernameHasValueValidator
,UsernameIDNHomographValidator
,UsernameMutationValidator
,UsernameProhibitedCharactersValidator
,ValidatorConfigValidator
Validates given input in a
ValidationContext
.
Validations can be supported with an optional inputHint
, which could denote a reference to a potentially
nested attribute of an object to validate.
Validations can be configured with an optional config
Map
.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
close()
default ValidationContext
Validates the giveninput
.default ValidationContext
Validates the giveninput
with an additionalinputHint
.default ValidationContext
validate
(Object input, String inputHint, ValidationContext context) Validates the giveninput
with an additionalinputHint
.validate
(Object input, String inputHint, ValidationContext context, ValidatorConfig config) Validates the giveninput
with an additionalinputHint
andconfig
.default ValidationContext
validate
(Object input, String inputHint, ValidatorConfig config) Validates the giveninput
with an additionalinputHint
.default ValidationContext
validate
(Object input, ValidationContext context) Validates the giveninput
.default ValidationContext
validate
(Object input, ValidatorConfig config) Validates the giveninput
with an additionalconfig
.
-
Method Details
-
validate
Validates the giveninput
.- Parameters:
input
- the value to validate- Returns:
- the validation context with the outcome of the validation
-
validate
Validates the giveninput
with an additionalconfig
.- Parameters:
input
- the value to validateconfig
- parameterization for the current validation- Returns:
- the validation context with the outcome of the validation
-
validate
Validates the giveninput
.- Parameters:
input
- the value to validatecontext
- the validation context- Returns:
- the validation context with the outcome of the validation
-
validate
Validates the giveninput
with an additionalinputHint
.- Parameters:
input
- the value to validateinputHint
- an optional input hint to guide the validation- Returns:
- the validation context with the outcome of the validation
-
validate
Validates the giveninput
with an additionalinputHint
.- Parameters:
input
- the value to validateinputHint
- an optional input hint to guide the validationconfig
- parameterization for the current validation- Returns:
- the validation context with the outcome of the validation
-
validate
Validates the giveninput
with an additionalinputHint
.- Parameters:
input
- the value to validateinputHint
- an optional input hint to guide the validationcontext
- the validation context- Returns:
- the validation context with the outcome of the validation
-
validate
ValidationContext validate(Object input, String inputHint, ValidationContext context, ValidatorConfig config) Validates the giveninput
with an additionalinputHint
andconfig
.- Parameters:
input
- the value to validateinputHint
- an optional input hint to guide the validationcontext
- the validation contextconfig
- parameterization for the current validation- Returns:
- the validation context with the outcome of the validation
-
close
default void close()
-