Announcement Announcement Module
Collapse
No announcement yet.
Static localhost address Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Static localhost address

    I ran the example 'spring-security-saml2-sample.war' successfully, but now I have a problem with redirection address of 302 Response of HTTP (Location header) for discovery - it is always set to http://localhost/spring-security-saml2-sample/..., How can I changed to my public server address?

    I found such code in SAMLEntryPoint class:

    Code:
    String contextPath = (String)context.getInboundMessageTransport().getAttribute("localContextPath");
    discoveryURL = contextPath + discoveryUrl + "?" + "returnIDParam" + "=" + "idp" + "&" + "entityID" + "="
                    + context.getLocalEntityId();
    Thanks in advance,

  • #2
    Hi,

    Set property entityBaseURL on bean MetadataGenerator to e.g. http://serverort/yourapp The value tells system about your public-facing URL.

    Vladi
    Last edited by vsch; Jun 27th, 2013, 03:46 PM. Reason: disabling smileys :)

    Comment


    • #3
      Vladi, I had a similar issue a while back and did not realize the importance of setting entityBaseUrl. It cost a lot of time to get this simple realization. Would it make sense to log a warning message when entityBaseURL is not set suggesting it be done so? I suspect that would save a lot of people a lot of time. What do you think?

      Comment


      • #4
        It's a good idea! I'll add some additional warning there.

        Vladi

        Comment

        Working...
        X