Skip to Content.
Sympa Menu

mace-opensaml-users - SAMLResponse

Subject: OpenSAML user discussion

List archive

SAMLResponse


Chronological Thread 
  • From: Sergej Wiebe <>
  • To: OpenSAML-ML <>
  • Subject: SAMLResponse
  • Date: 04 Jan 2003 19:18:39 +0100
  • Organization:

Hey,

I'm trying to code a single sign-on solution for java web applications
and got the following problem.

The authenticated user is forwared to his destination site (desired web
application) by the ForwardServlet which generates a SAMLResponse as
shown in the following code:

[...]
Date notBefore = new Date();
Date notOnOrAfter = null;
Date authInstant = notBefore;

Document doc = XML.parserPool.newDocument();
XMLSignature responseSig = new XMLSignature(doc, null,
XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA1);

SAMLPOSTProfile samlProfile = new SAMLPOSTProfile();

samlResponse =
samlProfile.prepare("https://localhost:8443/sso/TestAppServlet";,
"Issuer",
null,
"userXYZ",
null,
null,
null,
authMethod,
authInstant,
null,
responseSig,
null);

out.println("<html>");
out.println("<body onload='document.forms[0].submit()'>");
out.println("<form method='post'
action='https://localhost:8443/sso/TestAppServlet'>");

out.println("<input type='hidden' name='SAMLResponse' value='" +
Base64.encode(samlResponse.toBase64()) + "'>");
out.println("<input type='hidden' name='TARGET'
value='AnwendungsBeschreibung'>");
out.println("</form>");
out.println("</body>");
out.println("</html>");
out.close();
[...]

The SAMLResponse is decoded by the TestAppServlet using this commands:

[...]
byte[] buffer = Base64.decode(responseParameter);
SAMLPOSTProfile postProfile = new SAMLPOSTProfile();
SAMLResponse samlResponse = postProfile.accept(buffer, "TestAppServlet",
300);
[...]

And that's the point where I always get the following SAML exception:
"SAMLException: SAMLAssertion() unable to locate an implementation of
specified statement type"

What am I doing wrong? Are there any other documentatins for OpenSAML
than the API doc?

Thx in advance

Sergej

--
Sergej Wiebe
<>
GnuPG-Key-ID: BC5CB667

Nothing is as it seems.

Attachment: signature.asc
Description: This is a digitally signed message part




Archive powered by MHonArc 2.6.16.

Top of Page