<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Alex,<br>
<br>
I am not sure to understand what you are trying to achieve but to
get a Hawk session for Loop using Firefox accounts, you need to use
the Loop FxA Oauth endpoints.<br>
<br>
<a class="moz-txt-link-freetext" href="http://docs.services.mozilla.com/loop/apis.html#integration-with-firefox-accounts-using-oauth">http://docs.services.mozilla.com/loop/apis.html#integration-with-firefox-accounts-using-oauth</a><br>
<br>
The problem is that there is no way, yet, to use an existing Oauth
Bearer token to get an Hawk session. So you will need your user to
logs into Loop.<br>
<br>
<b>In your application you will need to store a binding between a
Firefox account and a Loop session.</b><br>
<br>
<b>The call url generation is synchroneous so you don't need to call
back Firefox Account</b>, as soon as you build it you can use it.<br>
<br>
According to your schema, your app will simply ask the Loop user to
logs into Loop and then your app will ask a call url for her and
then store it and give it back to the user.<br>
<br>
You can contact us on irc.mozilla.org/#loop-server if you need to
talk about it.<br>
<br>
Best regards,<br>
<br>
Rémy<br>
<br>
<br>
<div class="moz-cite-prefix">Le 16/02/2015 09:16, Oleksandr Kyetov a
écrit :<br>
</div>
<blockquote
cite="mid:CA+GOB=nmpH7CSdAWoeE+mpDz3H9sBg0CM-DhvFYR5qun+Mya_g@mail.gmail.com"
type="cite">
<div dir="ltr">Hi,
<div><br>
</div>
<div>I am working on the project which involves synchronization
between Loop Server API and Firefox Account</div>
<div><br>
</div>
<div>What I have:<br>
</div>
<div>1. I have Firefox Account with valid credentials</div>
<div>2. I able to use Loop Server API</div>
<div><br>
</div>
<div>Here is drawing of what I need:</div>
<div><a moz-do-not-send="true"
href="https://docs.google.com/drawings/d/1s6F0iKSWGLN8FTNsuMvB0ebNqbofIsGcuaLEi4BINCY/edit?usp=sharing">https://docs.google.com/drawings/d/1s6F0iKSWGLN8FTNsuMvB0ebNqbofIsGcuaLEi4BINCY/edit?usp=sharing</a><br>
</div>
<div><br>
</div>
<div>Here is what I need in words:</div>
<div>1. Log in to Firefox Account via Firefox</div>
<div>2. Call POST /registration Loop Server endpoint using user
from step 1 (<<< Here is the biggest problem. How to
call /registration endpoint using Firefox Account
credentials?)</div>
<div>3. Call POST /call-url Loop Server endpoint with
hawk-session-token derived from response in 2 step</div>
<div>4. Give generated call URL to the client</div>
<div>5. Make sure Firefox Account user sees generated URL in the
Firefox (<<< another problem here. How to notify
Firefox Account about call URL generated)</div>
<div><br>
</div>
<div>So, it should look like:</div>
<div>1. Client click a button</div>
<div>2. Server generates a call URL on server side using support
user Firefox Account credentials</div>
<div>3. Server passes call URL back to client</div>
<div>4. Server notifies support user Firefox Account about
client generated call URL</div>
<div><br>
</div>
<div>I have read a load of documentation, including:<br>
</div>
<div><a moz-do-not-send="true"
href="https://wiki.mozilla.org/Identity/Firefox_Accounts">https://wiki.mozilla.org/Identity/Firefox_Accounts</a><br>
</div>
<div><a moz-do-not-send="true"
href="https://docs.services.mozilla.com/loop/apis.html#post-call-url">https://docs.services.mozilla.com/loop/apis.html#post-call-url</a><br>
</div>
<div><a moz-do-not-send="true"
href="https://github.com/mozilla-services/loop-server">https://github.com/mozilla-services/loop-server</a><br>
</div>
<div>and did not find solution for that :(<br>
</div>
<div><br>
</div>
<div>According to Loop Server API, it is possible to register
with Firefox Account. For that I need to have Firefox Account
assertions, but I can't get those either</div>
<div>
<h4
style="font-family:OpenSansLight,sans-serif;font-weight:normal;color:rgb(33,34,36);margin:30px
0px 10px;padding:5px 0px;font-size:18.7199993133545px"><a
moz-do-not-send="true" class=""
href="https://docs.services.mozilla.com/loop/apis.html#id17"
style="color:rgb(0,149,221);text-decoration:none;line-height:20.5919990539551px">POST
/registration</a></h4>
<blockquote
style="color:rgb(62,67,73);font-family:OpenSans,sans-serif;font-size:14.3999996185303px">
<p style="line-height:1.5em">Associates a Simple Push
Endpoint (URL) with a user. Always return an hawk session
token in the <cite>Hawk-Session-Token</cite> header.</p>
<p style="line-height:1.5em"><strong>May require
authentication</strong></p>
<p style="line-height:1.5em">You don’t <em>need</em> to be
authenticated to register. In case you don’t register with
a Firefox Accounts assertion or a valid hawk session,
you’ll be given an hawk session token and be connected as
an anonymous user.</p>
<p style="line-height:1.5em">This hawk session token should
be derived by the client and used for subsequent requests.</p>
<p style="line-height:1.5em">You can currently authenticate
by sending a valid Firefox Accounts assertion or a valid
Hawk session.</p>
</blockquote>
</div>
<div><br>
</div>
<div>P.S. Thank you very much for help. If I put a wrong people
in mailing list, help me to find right person/mailing group</div>
<div>
<div>
<div><br>
</div>
<div>
<div>Best regards,</div>
<div>Alex K.</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Dev-fxacct mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Dev-fxacct@mozilla.org">Dev-fxacct@mozilla.org</a>
<a class="moz-txt-link-freetext" href="https://mail.mozilla.org/listinfo/dev-fxacct">https://mail.mozilla.org/listinfo/dev-fxacct</a>
</pre>
</blockquote>
<br>
</body>
</html>