Branches
The layout of the branches is made available at runtime in the following format:
[{ "name": "TOTP Branch", "steps": [ { "id": "step1", "mechanism": "urn:ibm:security:authentication:asf:mechanism:totp" } ] }, { "name": "MMFA Branch with EULA", "steps": [ { "id": "step1", "mechanism": "urn:ibm:security:authentication:asf:mechanism:mmfa" }, { "id": "step2", "mechanism": "urn:ibm:security:authentication:asf:mechanism:eula" } ] }]Two macros are populated with this data: @BRANCHES@ and [RPT branches]:
The Stringified representation should be used in HTML templates and mapping rules.
- @BRANCHES@
- Populated with the Stringified JSON representation of the branches
- [RPT branches]
- Populated with the multi-valued macro map representation
- 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