Hi,
I am trying to deal with sample application 'picketlink-federation-saml-sp-redirect-basic'. I deployed and ran the app, then I got redirected to IdP SSO page (OpenAM). After I got logged in IdP and redirected back to SP, I have the following URL in browser: http://hp.home.net:8080/employee/?SAMLart=AAQAANBTUeSBido399nhm0Kz%2F9%2BlQEzcKH%2F%2B1kPVWbSPmwE2Dypd3OuYMDE%3D
Trying to call request.getUserPrincipal() in login.jsp throws NullPointer. How can I solve it? What should I do with SAMLArt to get SAML response? Or how can I get the authenticated user?
Environment: JBoss EAP 6.3, picketlink 2.5.3.SP10. My picketlink.xml looks like following
<PicketLink xmlns="urn:picketlink:identity-federation:config:2.1">
<PicketLinkSP xmlns="urn:picketlink:identity-federation:config:2.1" BindingType="POST" RelayState="http://hp.home.net:8080/employee" ErrorPage="/error.jsp">
<IdentityURL>http://dell.uni.org:8181/openam/idpssoinit?metaAlias=/idp&spEntityID=http://hp.home.net:8080/employee</IdentityURL>
<ServiceURL>http://hp.home.net:8080/employee</ServiceURL>
</PicketLinkSP>
<Handlers xmlns="urn:picketlink:identity-federation:handler:config:2.1">
<Handler
class="org.picketlink.identity.federation.web.handlers.saml2.SAML2IssuerTrustHandler" />
<Handler
class="org.picketlink.identity.federation.web.handlers.saml2.SAML2LogOutHandler" />
<Handler
class="org.picketlink.identity.federation.web.handlers.saml2.SAML2AuthenticationHandler" />
<Handler
class="org.picketlink.identity.federation.web.handlers.saml2.RolesGenerationHandler" />
</Handlers>
</PicketLink>
Thanks in advance!
Hey Qu,
Why do you need a login page in the SP ? If you look at that example, there is an index.jsp page that uses request.getUserPrincipal to get the authenticated principal.
Regards.