IBM Support

Target URL redirection

Question & Answer


Question

How do I change the redirect URL from a TFIM or ISAM mapping rule?

Answer

Use the itfim_override_targeturl_attr attribute in your mapping rule. This should be added to the attribute list of the output stsuuser. In TFIM you may use XSL or JavaScript mapping rules, ISAM requires JavaScript mapping rules.

Example XSL rule snipit setting a static target URL:



<stsuuser:Attribute name="itfim_override_targeturl_attr" type="urn:ibm:names:ITFIM:5.1:accessmanager">
   <stsuuser:Value>http://www.example.com/</stsuuser:Value>
</stsuuser:Attribute>


Example XSL rule snipit setting the value based on an attribute in the input token called applicationIdURL:

<stsuuser:Attribute name="itfim_override_targeturl_attr" type="urn:ibm:names:ITFIM:5.1:accessmanager">
   <stsuuser:Value>
      <xsl:value-of select="stsuuser:Attribute[@name='applicationIdURL']/stsuuser:Value" />
   </stsuuser:Value>
</stsuuser:Attribute>


Example JavaScript snipit setting a static target URL:

var targetUrl = new java.lang.String("http://www.example.com/");
var targetUrlAttr = new Attribute("itfim_override_targeturl_attr", "urn:ibm:names:ITFIM:5.1:accessmanager", targetUrl);
stsuu.addAttribute(targetUrlAttr);


Example JavaScript snipit setting the value based on an attribute in the input token called applicationIdURL, and defaults to a static value if the input token attribute is not found or empty:

var targetUrl = new java.lang.String("http://www.example.com/");
var vals = stsuu.getAttributeContainer().getAttributeValuesByName("applicationIdURL");
if (vals != null && vals.length > 0) {
   targetUrl= vals;
}
var targetUrlAttr = new Attribute("itfim_override_targeturl_attr", "urn:ibm:names:ITFIM:5.1:accessmanager", targetUrl);
stsuu.addAttribute(targetUrlAttr);

[{"Product":{"code":"SSZSXU","label":"Tivoli Federated Identity Manager"},"Business Unit":{"code":"BU008","label":"Security"},"Component":"SSO","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Version Independent","Edition":""},{"Product":{"code":"SSZU8Q","label":"IBM Security Access Manager"},"Business Unit":{"code":"BU008","label":"Security"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Version Independent","Edition":""},{"Product":{"code":"SSELE6","label":"IBM Security Access Manager for Mobile"},"Business Unit":{"code":"BU008","label":"Security"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Version Independent","Edition":""},{"Product":{"code":"SSPREK","label":"IBM Security Access Manager for Web"},"Business Unit":{"code":"BU008","label":"Security"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Version Independent","Edition":""}]

Document Information

Modified date:
16 June 2018

UID

swg21676244