Bean Validation and User Storage SPIs

Hi,

Is it possible to use Bean Validation with an SPI? I saw the proposal from 2 years ago about ValidationContext. Is this something we should extend with instead?

I had read the CDI wasn’t available to SPIs, so I’m trying to programmatically create the Validator object but can’t seem to link up the call to the Keycloak libraries. I’m getting this from buildDefaultValidatorFactory().

Add a provider like Hibernate Validator (RI) to your classpath

Thanks,
Carl