public static SSOAuthnRequestValidator getIdPInitSSOAuthnRequestValidator(QueryParamDTO[] queryParamDTOs, String relayState) {
if (iDPInitSSOAuthnRequestValidatorClassName == null || "".equals(iDPInitSSOAuthnRequestValidatorClassName)) {
try {
return new IdPInitSSOAuthnRequestValidator(queryParamDTOs, relayState);
} catch (IdentityException e) {
log.error("Error while instantiating the IdPInitSSOAuthnRequestValidator ", e);
}
} else {
try {
Class clazz = Thread.currentThread().getContextClassLoader()
.loadClass(iDPInitSSOAuthnRequestValidatorClassName);
return (SSOAuthnRequestValidator) clazz.getDeclaredConstructor(
QueryParamDTO[].class, String.class).newInstance(queryParamDTOs, relayState);
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
log.error("Error while instantiating the IdPInitSSOAuthnRequestValidator ", e);
} catch (NoSuchMethodException e) {
log.error("SP initiated authentication request validation class in run time does not have proper" +
"constructors defined.");
} catch (InvocationTargetException e) {
log.error("Error in creating an instance of the class: " + sPInitSSOAuthnRequestValidatorClassName);
}
}
return null;
}
SAML request validor
最新推荐文章于 2024-07-13 13:49:41 发布