ここではPicketlink Federation 2.5.4の抜粋です。Jboss 6.4に同梱されているSP4クラスorg.picketlink.identity.federation.web.handlers.saml2.SAML2AuthenticationHandler(picketlink.org githubのタグなし2.5 .4 SP4?)。私の問題は、トップラインのrequest.getRequestDocument()がnullを返すことです。オブジェクト自体、要求(SAML2HandlerRequestは)(nullでない)正常に見える:FYIPicketlink gets null Document from
public void handleStatusResponseType(SAML2HandlerRequest request, SAML2HandlerResponse response)
throws ProcessingException {
HTTPContext httpContext = (HTTPContext) request.getContext();
ResponseType responseType = (ResponseType) request.getSAML2Object();
(...)
Document responseDocument = request.getRequestDocument();
Element assertionElement =
DocumentUtil.getChildElement(responseDocument.getDocumentElement(),
new QName(JBossSAMLConstants.ASSERTION.get()));
if (assertionElement != null) {
try {
Document assertionDocument = DocumentUtil.createDocument();
Node clonedAssertion = assertionElement.cloneNode(true);
assertionDocument.adoptNode(clonedAssertion);
assertionDocument.appendChild(clonedAssertion);
String assertionAttributeName = (String) handlerConfig
.getParameter(GeneralConstants.ASSERTION_SESSION_ATTRIBUTE_NAME);
if (assertionAttributeName != null) {
session.setAttribute(assertionAttributeName, assertionDocument);
}
session.setAttribute(GeneralConstants.ASSERTION_SESSION_ATTRIBUTE_NAME, assertionDocument);
} catch (ConfigurationException e) {
throw new ProcessingException("Could not store assertion document into session.", e);
}
}
、responseDocumentがnullの場合、私は、この文書が必要な理由は、あなたがコードに見るようにということで、その後、asserionElementがありますヌル。 assertionElementがnullの場合、SAMLトークンは指定されたキーの下にHTTPSessionになくなり、それが必要です。
アイデンティティプロバイダはPingIdentityです。 PicketLinkコードベース全体を学ばなければならないうちに、ここで何が起こっているのかについてのヒントや秘訣はありますか?
ありがとうございます!
FYI myセットアップはjboss 6.4で、ピケットリンクは(2.5.4 SP4)、SAMLトークン(IdP)のPingIdentityとともに出荷されます。参考までに、WebApp 1からWebApp 2までのすべてのSSOシナリオで作業していますが、唯一のことはWebApp 2のSSOセッションからSAMLトークンを取得する必要があることです。