Class OrganizationMemberValidator
java.lang.Object
org.keycloak.validate.AbstractSimpleValidator
org.keycloak.organization.validator.OrganizationMemberValidator
- All Implemented Interfaces:
EnvironmentDependentProviderFactory
,Provider
,ProviderFactory<Validator>
,SimpleValidator
,Validator
,ValidatorFactory
public class OrganizationMemberValidator
extends AbstractSimpleValidator
implements EnvironmentDependentProviderFactory
-
Field Summary
Fields inherited from class org.keycloak.validate.AbstractSimpleValidator
IGNORE_EMPTY_VALUE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doValidate
(Object value, String inputHint, ValidationContext context, ValidatorConfig config) Validate type, format, range of the value etc.getId()
boolean
isSupported
(Config.Scope config) Check if the provider is supported and should be available based on the provider configuration.protected boolean
skipValidation
(Object value, ValidatorConfig config) Decide if validation of individual value should be skipped or not.Methods inherited from class org.keycloak.validate.AbstractSimpleValidator
isIgnoreEmptyValuesConfigured, validate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.keycloak.provider.ProviderFactory
getConfigMetadata, order
Methods inherited from interface org.keycloak.validate.SimpleValidator
close, create, init, postInit
Methods inherited from interface org.keycloak.validate.Validator
validate, validate, validate, validate, validate
Methods inherited from interface org.keycloak.validate.ValidatorFactory
validateConfig
-
Field Details
-
ID
- See Also:
-
-
Constructor Details
-
OrganizationMemberValidator
public OrganizationMemberValidator()
-
-
Method Details
-
getId
- Specified by:
getId
in interfaceProviderFactory<Validator>
-
doValidate
protected void doValidate(Object value, String inputHint, ValidationContext context, ValidatorConfig config) Description copied from class:AbstractSimpleValidator
Validate type, format, range of the value etc. Always useValidationContext.addError(ValidationError)
to report error to the user! Can be called multiple time for one validation if input is Collection.- Specified by:
doValidate
in classAbstractSimpleValidator
- Parameters:
value
- to be validated, never nullcontext
- for the validation. Add errors into it.config
- of the validation if provided- See Also:
-
skipValidation
Description copied from class:AbstractSimpleValidator
Decide if validation of individual value should be skipped or not. It should be controlled byAbstractSimpleValidator.IGNORE_EMPTY_VALUE
configuration option, seeAbstractSimpleValidator.isIgnoreEmptyValuesConfigured(ValidatorConfig)
.- Specified by:
skipValidation
in classAbstractSimpleValidator
- Parameters:
value
- currently validated we make decision forconfig
- to look for options in- Returns:
- true if validation should be skipped for this value -
AbstractSimpleValidator.doValidate(Object, String, ValidationContext, ValidatorConfig)
is not called in this case. - See Also:
-
isSupported
Description copied from interface:EnvironmentDependentProviderFactory
Check if the provider is supported and should be available based on the provider configuration.- Specified by:
isSupported
in interfaceEnvironmentDependentProviderFactory
- Parameters:
config
- the provider configuration- Returns:
true
if the provider is supported. Otherwise,false
.
-