mace-opensaml-users - Re: SAMLResponse
Subject: OpenSAML user discussion
List archive
- From: "Helen (Nell) Rehn" <>
- To: Sergej Wiebe <>, OpenSAML-ML <>
- Subject: Re: SAMLResponse
- Date: Sat, 04 Jan 2003 12:52:10 -0600
Hi,
Be sure you've called Init.init() before you try to do any deserialization... this creates the mapping table which locates implementations.
Thanks,
Nell
At 07:18 PM 1/4/2003 +0100, Sergej Wiebe wrote:
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.
______________________________________________________
Helen (Nell) Rehn graduate research assistant
University of Illinois / NCSA phone: (773) 425-2558
605 E. Springfield e-mail:
Champaign, IL 61820 http://www.mcs.anl.gov/~rehn
---------------------------------------------------mace-opensaml-users-+
For list utilities, archives, subscribe, unsubscribe, etc. please visit the
ListProc web interface at
http://archives.internet2.edu/
---------------------------------------------------mace-opensaml-users--
- SAMLResponse, Sergej Wiebe, 01/04/2003
- Re: SAMLResponse, Helen (Nell) Rehn, 01/04/2003
- RE: SAMLResponse, Scott Cantor, 01/04/2003
- RE: SAMLResponse, Sergej Wiebe, 01/05/2003
- RE: SAMLResponse, Scott Cantor, 01/04/2003
- Re: SAMLResponse, Helen (Nell) Rehn, 01/04/2003
Archive powered by MHonArc 2.6.16.