use of org.apache.syncope.client.lib.AnonymousAuthenticationHandler in project syncope by apache.
the class SAML2SPDetector method isSAML2SPAvailable.
public static boolean isSAML2SPAvailable() {
synchronized (LOG) {
if (ENABLED == null) {
try {
new SyncopeClientFactoryBean().setAddress(AbstractITCase.ADDRESS).setContentType(SyncopeClientFactoryBean.ContentType.XML).create(new AnonymousAuthenticationHandler(AbstractITCase.ANONYMOUS_UNAME, AbstractITCase.ANONYMOUS_KEY)).getService(SAML2SPService.class).getMetadata("http://localhost:9080/syncope", "saml2sp");
ENABLED = true;
} catch (Exception e) {
// ignore
ENABLED = false;
}
}
}
return ENABLED;
}
Aggregations