<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (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;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 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:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@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]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Paul-<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Care to share your configs?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<p class="MsoNormal"><span style="color:#1F497D">-Etan E. Weintraub<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Sr. Systems Engineer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Directory Architecture<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">IT@Johns Hopkins<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Johns Hopkins at Mt. Washington<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">5801 Smith Ave.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Suite 3110B<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Baltimore, MD 21209<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Phone: 410-735-7945<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">E-mail: <a href="mailto:eweintra@jhmi.edu">
<span style="color:#1F497D">eweintra@jhmi.edu</span></a><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> users-bounces@shibboleth.net [mailto:users-bounces@shibboleth.net]
<b>On Behalf Of </b>Paul Hethmon<br>
<b>Sent:</b> Thursday, December 20, 2012 3:08 PM<br>
<b>To:</b> Shib Users<br>
<b>Cc:</b> users@shibboleth.net<br>
<b>Subject:</b> Re: Accessing Attributes from LoginHandler via attribute-resolver.xml<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">Etan<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">I do this and had to create a custom principal to hold the info. The login handler pushes the data into it during authentication. Then I have a separate data resolver that pulls the info out as attributes during that phase. So the principal
 is my data transport between the two distinct plug ins.&nbsp;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Paul<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal">(This phone has more cpu power than my first several computers, combined)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
On Dec 20, 2012, at 11:59 AM, &quot;Etan Weintraub&quot; &lt;<a href="mailto:eweintra@jhmi.edu">eweintra@jhmi.edu</a>&gt; wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">Hi all-<o:p></o:p></p>
<p class="MsoNormal">So, I&#8217;ve been googling and searching the mailing list for a bit with minimal look, and figured it was about time for me to give up and ask for help.<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">Anyway, we&#8217;re developing a custom login handler for a project, and it will pretty much be the only way for us to get attributes about the user (the data store we are using isn&#8217;t something we can access over LDAP or SQL). The login handler
 plugin should be able to return them in the requestContext, which I know I could probably use somewhere in the DataConnector pieces, but I need to use it in the AttributeDefinition piece instead. For example, let&#8217;s say parallel to principalName it returns
 another value &#8220;fullName&#8221;. I&#8217;d like to do something like the following, but it doesn&#8217;t work:<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp; &lt;resolver:AttributeDefinition xsi:type=&quot;Script&quot; xmlns=&quot;urn:mace:shibboleth:2.0:resolver:ad&quot; id=&quot;EtanFullName&quot; &gt;<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp; &lt;Script&gt;&lt;![CDATA[<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; importPackage(Packages.edu.internet2.middleware.shibboleth.common.attribute.provider);<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EtanFullName = new BasicAttribute(&quot;EtanFullName&quot;);<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EtanFullName.getValues().add($requestContext.fullName);<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp; ]]&gt;&lt;/Script&gt;<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp; &lt;/resolver:AttributeDefinition&gt;<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">I get the following error (trimmed up a bit for here) in the idp-process.log:<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">12:37:24.988 - ERROR [edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.attributeDefinition.ScriptedAttributeDefinition:135] - ScriptletAttributeDefinition EtanFullName unable to execute script<o:p></o:p></p>
<p class="MsoNormal">com.sun.phobos.script.util.ExtendedScriptException: org.mozilla.javascript.EcmaError: ReferenceError: &quot;$requestContext&quot; is not defined. (&lt;Unknown Source&gt;#3) in &lt;Unknown Source&gt; at line number 3<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">Any ideas?<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">Thanks in advance.<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">-Etan E. Weintraub<o:p></o:p></p>
<p class="MsoNormal">Sr. Systems Engineer<o:p></o:p></p>
<p class="MsoNormal">Directory Architecture<o:p></o:p></p>
<p class="MsoNormal">IT@Johns Hopkins<o:p></o:p></p>
<p class="MsoNormal">Johns Hopkins at Mt. Washington<o:p></o:p></p>
<p class="MsoNormal">5801 Smith Ave.<o:p></o:p></p>
<p class="MsoNormal">Suite 3110B<o:p></o:p></p>
<p class="MsoNormal">Baltimore, MD 21209<o:p></o:p></p>
<p class="MsoNormal">Phone: 410-735-7945<o:p></o:p></p>
<p class="MsoNormal">E-mail: <a href="mailto:eweintra@jhmi.edu"><span style="color:windowtext">eweintra@jhmi.edu</span></a><o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
</blockquote>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">--<br>
To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net">
users-unsubscribe@shibboleth.net</a><o:p></o:p></span></p>
</div>
</blockquote>
</div>
</body>
</html>