throw logger.authSharedCredentialIsNotSAMLCredential(credential.getClass().getName());
return true;
}
// obtain the assertion from the callback handler.
ObjectCallback callback = new ObjectCallback(null);
Element assertionElement = null;
try {
if (getSamlTokenHttpHeader() != null) {
this.credential = getCredentialFromHttpRequest();
}
else {
super.callbackHandler.handle(new Callback[] { callback });
if (callback.getCredential() instanceof String) {
callback.setCredential(new SamlCredential(DocumentUtil.getDocument(callback.getCredential().toString()).getDocumentElement()));
}
if (callback.getCredential() instanceof SamlCredential == false)
throw logger.authSharedCredentialIsNotSAMLCredential(callback.getCredential().getClass().getName());
this.credential = (SamlCredential) callback.getCredential();
}
assertionElement = this.credential.getAssertionAsElement();
} catch (Exception e) {
throw logger.authErrorHandlingCallback(e);
}