IBM Verify

IBM Verify

Join this online user group to communicate across Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only

Template page scripting: Access URL parameter

  • 1.  Template page scripting: Access URL parameter

    Posted 12/09/19 08:22 AM

    Hi community,

    I have an Infomap that should set a credential attribute and show a page. The page contains elements that are protected with a context-based pop (it has "requires" property). So to show the page properly the attribute should be set.
    If I use

    success.setValue(false);

    then the attribute is not set. The attribute is only set if the rule ends with

     success.setValue(true);

     but in this case I can't set the page. The only way is to redirect to that page:

     context.set(Scope.SESSION, "urn:ibm:security:asf:response:token:attributes", "itfim_override_targeturl_attr", "/path to the page");

     
    but in this case I can't use template macros.

    I thought I could use Template page scripting, but I don't know how to pass any information there. There is an object templateContext  that is used in the template page scripting to access the macros and set responce parameters. Is there a property to get URL parameters throght this object? Or may be there is another way to get URL parameters in the template page scripting?



    ------------------------------
    Ivan Yartsev
    ------------------------------