Permalink
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
shib-idp-conftree/dist/views/resolvertest.vm.dist
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
47 lines (41 sloc)
1.51 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## Velocity Template for Status Reporting flow | |
## | |
## Velocity context will contain the following properties | |
## flowRequestContext - the Spring Web Flow RequestContext | |
## request - HttpServletRequest | |
## response - HttpServletResponse | |
## profileRequestContext | |
## attributeContext | |
## XMLObjectSupport | |
## SerializeSupport | |
## environment - Spring Environment object for property resolution | |
## custom - arbitrary object injected by deployer | |
## | |
#if ($flowRequestContext.getCurrentEvent() and !$flowRequestContext.getCurrentEvent().getId().equals("proceed")) | |
{ "error": "$flowRequestContext.getCurrentEvent().getId()" } | |
$response.setContentType("application/json") | |
#stop | |
#end | |
#if ($profileRequestContext.getOutboundMessageContext() and $profileRequestContext.getOutboundMessageContext().getMessage()) | |
$SerializeSupport.prettyPrintXML($XMLObjectSupport.marshall($profileRequestContext.getOutboundMessageContext().getMessage())) | |
$response.setContentType("text/xml") | |
#stop | |
#end | |
{ | |
"requester": "$profileRequestContext.getInboundMessageContext().getMessage().getRequesterId()", | |
"principal": "$profileRequestContext.getInboundMessageContext().getMessage().getPrincipal()", | |
"attributes": [ | |
#foreach ($attribute in $attributeContext.getIdPAttributes()) | |
{ | |
"name": "$attribute.getId()", | |
"values": [ | |
#foreach ($value in $attribute.getValues()) | |
"$value.toString().replace('"','\"')"#if( $foreach.hasNext ),#end | |
#end | |
] | |
}#if( $foreach.hasNext ),#end | |
#end | |
] | |
} | |
$response.setContentType("application/json") |