<html 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=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<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:12.0pt;
        font-family:"Times New Roman";}
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-reply;
        font-family:Calibri;
        color:windowtext;}
span.msoIns
        {mso-style-type:export-only;
        mso-style-name:"";
        text-decoration:underline;
        color:teal;}
.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>
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">I see. We may put the server behind an API Manager (Kong). I wonder if we could, and would be easier, manipulate the token endpoint response there.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">Luiz<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-family:Calibri;color:black">From: </span>
</b><span style="font-family:Calibri;color:black">Justin Richer &lt;jricher@mit.edu&gt;<br>
<b>Date: </b>Tuesday, June 13, 2017 at 12:41 PM<br>
<b>To: </b>Luiz Omori &lt;luiz.omori@duke.edu&gt;<br>
<b>Cc: </b>&quot;mitreid-connect@mit.edu&quot; &lt;mitreid-connect@mit.edu&gt;<br>
<b>Subject: </b>Re: [mitreid-connect] Injecting custom fields in the token endpoint response<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal">It’s hard to do with the current library dependencies, and we haven’t had the time or opportunity to pull out the offending library (it’s in there deep). You’d need a custom token granter to create a token with an “additional info” field
 with your extra bits in it. These aren’t currently persisted to the database, so you might also need a custom token class.
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">The “right” solution is pulling out the Spring Security OAuth library and rewriting those parts of the server, but that’s a big project.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp;— Justin<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On Jun 13, 2017, at 12:05 PM, Luiz Omori &lt;<a href="mailto:luiz.omori@duke.edu">luiz.omori@duke.edu</a>&gt; wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:Calibri">Hi,</span><span style="font-family:Calibri"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:Calibri">&nbsp;</span><span style="font-family:Calibri"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:Calibri">Our project has an external requirement that calls for injecting some custom fields with the token endpoint response, along with the access_token, id_token, etc.
 These fields are going to be populated with information from an extended UserInfo class. Any suggestions for how to accomplish that using an overlay?</span><span style="font-family:Calibri"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:Calibri">&nbsp;</span><span style="font-family:Calibri"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:Calibri">The SMART on FHIR project had a similar requirement but I believe they ended up forking and overriding a class in the server code.</span><span style="font-family:Calibri"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:Calibri">&nbsp;</span><span style="font-family:Calibri"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:Calibri">Regards,</span><span style="font-family:Calibri"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:Calibri">Luiz</span><span style="font-family:Calibri"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Helvetica;background:white">_______________________________________________</span><span style="font-size:9.0pt;font-family:Helvetica"><br>
<span style="background:white">mitreid-connect mailing list</span><br>
</span><a href="mailto:mitreid-connect@mit.edu"><span style="font-size:9.0pt;font-family:Helvetica;color:#954F72;background:white">mitreid-connect@mit.edu</span></a><span style="font-size:9.0pt;font-family:Helvetica"><br>
</span><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.mit.edu_mailman_listinfo_mitreid-2Dconnect&amp;d=DwMFaQ&amp;c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&amp;r=R6m41WT3w_KtulQAsSIxc_C2mwuKoWSycEMpss0QQJA&amp;m=0I1FGIydy5j_S7ij0t4UMe83husguaoHX1GHr0xUVQg&amp;s=3rmJOk_cfD9CVe8-bxUlmVgw3KDTkEM18_P7ulgwUhs&amp;e="><span style="font-size:9.0pt;font-family:Helvetica;color:#954F72;background:white">http://mailman.mit.edu/mailman/listinfo/mitreid-connect</span></a><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</div>
</body>
</html>