Shibb branding question
David Massie
dhm24 at georgetown.edu
Wed Mar 7 17:24:39 GMT 2012
All,
I am trying to copy the branding we are using for shibb from version
2.1.5 to v 2.3.5. In 2.1.5 we used the referer page to determine which
brand to display on the login page.
In 2.3.5, the forums say it is better to use the metadata to discover
the brand. So, they have provided a code fragment to get the metadata
into the login.jsp page. See below.
Once I have the metadata available, I want to get the entityId and use
it's value to determine branding.
I think I need to have something like:
String entityId = metadata.get("entityId");
Or, some variation thereof.
Well, I haven't been able to find the correct variation, and I was
wondering if anyone could point me in the right direction.
I checked at: http://shibboleth.net/api/mda/latest/ and was unable to
find the EntityDescriptor object.
Thanks,
Dave
Below is the code that brings in the metadata to the login.jsp page. I
got it at:
https://wiki.shibboleth.net/confluence/display/SHIB2/IdPAuthUserPassLoginPage
<%@ page
import="edu.internet2.middleware.shibboleth.idp.util.HttpServletHelper" %>
<%@ page import="org.opensaml.util.storage.StorageService" %>
<%@ page
import="edu.internet2.middleware.shibboleth.idp.authn.LoginContext" %>
<%@ page
import="edu.internet2.middleware.shibboleth.common.relyingparty.RelyingPartyConfigurationManager"
%>
<%@ page import="org.opensaml.saml2.metadata.EntityDescriptor" %>
<%
StorageService storageService =
HttpServletHelper.getStorageService(application);
LoginContext loginContext =
HttpServletHelper.getLoginContext(storageService,application, request);
RelyingPartyConfigurationManager rpConfigMngr =
HttpServletHelper.getRelyingPartyConfigurationManager(application);
EntityDescriptor metadata =
HttpServletHelper.getRelyingPartyMetadata(loginContext.getRelyingPartyId(),
rpConfigMngr);
%>
--
Thanks,
Dave Massie
x73880
More information about the users
mailing list