Class PingOneEnvironmentValidator
- java.lang.Object
-
- org.sourceid.saml20.adapter.gui.validation.impl.PingOneEnvironmentValidator
-
- All Implemented Interfaces:
Serializable,FieldValidator
public class PingOneEnvironmentValidator extends Object implements FieldValidator
This validator class works together with thePingOneEnvironmentFieldDescriptorby validating the environment selected in the descriptor against PingOne. Usage of this validator is mainly needed for API updates as the descriptor UI restricts invalid input. As this validator requires an external call to PingOne, validation can be bypassed by setting the X-BypassExternalValidation header on the Admin API request.- Since:
- 10.2
- See Also:
PingOneEnvironmentFieldDescriptor,PingOneEnvironmentAccessor, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PingOneEnvironmentValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisExternalValidator()This method should be overridden if the validator implementation relies on an external resource to perform validation.voidvalidate(Field field)Checks if the environment specified in the field exists within the PingOne connection.
-
-
-
Method Detail
-
validate
public void validate(Field field) throws ValidationException
Checks if the environment specified in the field exists within the PingOne connection. The respective IDs are extracted from the field value and a request to obtain the environment lists is made to the configured connection.- Specified by:
validatein interfaceFieldValidator- Parameters:
field- the field (name and value) to validate.- Throws:
ValidationException- if the configured connection or environment does not exist, the gateway credential is invalid, or the PingOne API request fails
-
isExternalValidator
public boolean isExternalValidator()
Description copied from interface:FieldValidatorThis method should be overridden if the validator implementation relies on an external resource to perform validation. External validators are skipped if the X-BypassExternalValidation header is set to true in the Admin API request. Defaults to false.- Specified by:
isExternalValidatorin interfaceFieldValidator- Returns:
- if this validator relies on an external resource
-
-