OpenAM 13 – Getting contextPath while customizing DataStore1.html

This topic has 0 replies, 1 voice, and was last updated 1 week, 2 days ago by l.scorcia.

  • Author
    Posts
  • #27580
     l.scorcia
    Participant

    Hello everyone,
    I am trying to customize the UI of our OpenAM 13 setup by editing DataStore1.html and some other html template and I need to build an absolute url to OpenAM (i.e. current URI is https://login.domain.com:8080/openam/XUI/#login, I need to get https://login.domain.com:8080/openam), in order to pass it to the RelayState parameter of spSSOInit.jsp .

    Now, this is not impossible to get using the various window.location properties, but I was trying to keep it independent of the actual deployment, so I was wondering if there is a direct way to get the current protocol+host+port+contextPath from some property available to the UI via Handlebars or global variables or something else. If it were a JSP I would just use ‘${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}’, but here we’re in a static html template and I don’t know if there is some way to get the required pieces, especially the contextPath. Do you have any suggestions?

    Thanks in advance,
    Luca

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

©2020 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?