Branches

The layout of the branches is made available at runtime in the following format:

Two macros are populated with this data: @BRANCHES@ and [RPT branches]:

@BRANCHES@
Populated with the Stringified JSON representation of the branches
[RPT branches]
Populated with the multi-valued macro map representation
The Stringified representation should be used in HTML templates and mapping rules.
HTML template usage
var branchesMacro ="@BRANCHES@";
Mapping rule usage
macros.get("@BRANCHES@");

The multi-valued macro map representation should be used in JSON templates. Structured JSON template usage:

"branches": [
    [RPT branches]
    {
        "name": "@BRANCH_NAME@",
        "steps": [
            [RPT steps]
            {
                "id": "@STEP_ID@",
                "mechanism": "@STEP_URI@"
            }            [ERPT steps]  
         ]
     }     [ERPT branches]
]

Compact JSON template page:

"branches": [[RPT branches] {"name": "@BRANCH_NAME@",
"steps": [[RPT steps] {"id": "@STEP_ID@", "mechanism":
"@STEP_URI@"} [ERPT steps]] } [ERPT branches]]
The steps macro [RPT steps] is also populated for use by [RPT branches].

RPT and ERPT denote the start and end of the object that is repeated. The surrounding square brackets should not be confused with these tags, as they are the JSON syntax for the arrays.


Parent topic: Branching Authentication Policies