<div dir="ltr"><div><div><div>Thanks for all the help Ryan.  I got everything working now.<br><br></div>here's a first prototype based on your PyFxA branch:<br><br><a href="https://github.com/tarekziade/fxakeys/blob/master/fxakeys/shareapp.py">https://github.com/tarekziade/fxakeys/blob/master/fxakeys/shareapp.py</a><br><br></div>This prototype is a full client-side app that uses OAuth2 implicit grant - once connected to FxA, it interacts with a "Key Service" (fxa provider) where the user publishes app encryption key,<br><br></div>The demo shows how an end-to-end encryption flow between two FxA users could work.<br><div><div><br></div><div>(Of course the whole thing is based on the assumption that login inrto FxA  will let us have kBr as we defined it.)<br></div><div><br></div><div>The next piece I am adding is a dummy storage service and I'll have the full POC.<br></div><div><br></div><div>Cheers<br></div><div>Tarek<br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 8, 2015 at 10:26 AM, Ryan Kelly <span dir="ltr"><<a href="mailto:rfkelly@mozilla.com" target="_blank">rfkelly@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On 8/01/2015 19:22, Tarek Ziade wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sorry I meant "Unkown Client"<br>
<br>
here's the full sample I am trying against your branch:<br>
<a href="http://tarek.pastebin.mozilla.org/8170247" target="_blank">http://tarek.pastebin.mozilla.<u></u>org/8170247</a><br>
</blockquote>
<br></span>
The fxa.oauth.Client class takes the client secret as its second arg, so you need to pass server_url by kwd like:<br>
<br>
  oauth_client = OAuthClient(CLIENT_ID, server_url=OAUTH_SERVER)<br>
<br>
<br>
You do also need canGrant=true in your client record, which I went ahead and changed in the db for you.  With that, this above script seems to run ok for me.<br>
<br>
<br>
  Cheers,<br>
<br>
    Ryan<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
On Thu, Jan 8, 2015 at 9:13 AM, Tarek Ziade <<a href="mailto:tarek@mozilla.com" target="_blank">tarek@mozilla.com</a><br></span><span class="">
<mailto:<a href="mailto:tarek@mozilla.com" target="_blank">tarek@mozilla.com</a>>> wrote:<br>
<br>
<br>
<br>
    On Wed, Jan 7, 2015 at 9:38 PM, Ryan Kelly <<a href="mailto:rfkelly@mozilla.com" target="_blank">rfkelly@mozilla.com</a><br></span><span class="">
    <mailto:<a href="mailto:rfkelly@mozilla.com" target="_blank">rfkelly@mozilla.com</a>>> wrote:<br>
<br>
<br>
        This endpoint is also (soon to be, after branch merge) exposed<br>
        in PyFxA if you want to play around with the flow:<br>
<br>
<br>
        <a href="https://github.com/mozilla/PyFxA/blob/rfk/assertion-and-oauth-helpers/fxa/oauth.py#L118" target="_blank">https://github.com/mozilla/<u></u>PyFxA/blob/rfk/assertion-and-<u></u>oauth-helpers/fxa/oauth.py#<u></u>L118</a><br>
<br>
<br>
    I get an invalid response_type back from the server with this.<br>
<br>
    Is this because my client_id has no implicit grant or something else ?<br>
<br>
    I got one from <a href="https://oauth-stable.dev.lcip.org/console/clients" target="_blank">https://oauth-stable.dev.lcip.<u></u>org/console/clients</a><br>
    (but that generates a secret too)<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
          Cheers,<br>
<br>
             Ryan<br>
<br>
<br>
<br>
</span></blockquote>
</blockquote></div><br></div>