able to detect which sp is being serviced?

Peter Schober peter.schober at
Tue Jul 17 03:25:51 EDT 2018

* Pablo Vidaurri <psvidaurri at> [2018-07-16 17:42]:
> In login.jsp for shib 2, is there a way detect which sp is being serviced?
> I have up to 4 service providers using my idp but I need to do something
> special for one of them. How can I tell if I'm servicing

I'm not using login.jsp but the default login.vm, but you can probably
adapt the method:

In views/login.vm after the line
#set ($rpContext = $profileRequestContext.getSubcontext('net.shibboleth.idp.profile.context.RelyingPartyContext'))
add this line:
#set ($spEntityId = $rpContext.getRelyingPartyId())

Then the SP's entityID is available in the variable $spEntityId.


More information about the users mailing list