<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
<div class="moz-cite-prefix">On 4/2/15 12:13 PM, Abromowitz, Samuel
wrote:<br>
</div>
<blockquote
cite="mid:DM2PR0601MB110156DC21202D0BCCC5FBE58FF20@DM2PR0601MB1101.namprd06.prod.outlook.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Looking at the wiki <a
moz-do-not-send="true"
href="https://wiki.shibboleth.net/confluence/display/IDP30/ScriptedAttributeDefinition">https://wiki.shibboleth.net/confluence/display/IDP30/ScriptedAttributeDefinition</a>
I see that the requestContext has changed. With IDP V2 I was
able to get the relay state by calling
requestContext.getRelayState() from the attribute resolver. Is
there a way to do this with IDP V3?<br>
</p>
</div>
</blockquote>
<br>
Yes. Literally everything the IdP is processing is visible via the
ProfileRequestContext, which is the root of a tree of contexts. As
that page documents, it's exposed via the '
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
profileContext' variable.<br>
<br>
The Java for this would be:<br>
<br>
<tt>profileContext.getInboundMessageContext().getSubcontext(SAMLBindingContext.class).getRelayState();</tt><br>
<br>
where SAMLBindingContext full class is =
org.opensaml.saml.common.messaging.context.SAMLBindingContext<br>
<br>
<br>
The general way to access subcontexts in the tree from a resolver
script is also documented there in the wiki. I can't test off-hand,
but I think the scripted variant for your question should be
something like the following:<br>
<br>
<tt>clazloader = resolutionContext.getClass().getClassLoader();</tt><tt><br>
</tt><tt><br>
bindingContextClass =
clazloader.loadClass("org.opensaml.saml.common.messaging.context.SAMLBindingContext");</tt><tt><br>
</tt><tt><br>
relayState =
resolutionContext.getInboundMessageContext().getSubcontext(bindingContextClass).getRelayState();</tt><tt><br>
</tt><tt> </tt><br>
</body>
</html>