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
public interface Validator extends Provider
Validates given input in aValidationContext
.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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
close()
default ValidationContext
validate(Object input)
Validates the giveninput
.default ValidationContext
validate(Object input, String inputHint)
Validates the giveninput
with an additionalinputHint
.default ValidationContext
validate(Object input, String inputHint, ValidationContext context)
Validates the giveninput
with an additionalinputHint
.ValidationContext
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 Detail
-
validate
default ValidationContext validate(Object input)
Validates the giveninput
.- Parameters:
input
- the value to validate- Returns:
- the validation context with the outcome of the validation
-
validate
default ValidationContext validate(Object input, ValidatorConfig config)
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
default ValidationContext validate(Object input, ValidationContext context)
Validates the giveninput
.- Parameters:
input
- the value to validatecontext
- the validation context- Returns:
- the validation context with the outcome of the validation
-
validate
default ValidationContext validate(Object input, String inputHint)
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
default ValidationContext validate(Object input, String inputHint, ValidatorConfig config)
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
default ValidationContext validate(Object input, String inputHint, ValidationContext context)
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
-
-