Hi Alex,

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.

http://docs.services.mozilla.com/loop/apis.html#integration-with-firefox-accounts-using-oauth

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.

*In your application you will need to store a binding between a Firefox
account and a Loop session.*

*The call url generation is synchroneous so you don't need to call back
Firefox Account*, as soon as you build it you can use it.

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.

You can contact us on irc.mozilla.org/#loop-server if you need to talk
about it.

Best regards,

Rémy


Le 16/02/2015 09:16, Oleksandr Kyetov a écrit :
> Hi,
>
> I am working on the project which involves synchronization between
> Loop Server API and Firefox Account
>
> What I have:
> 1. I have Firefox Account with valid credentials
> 2. I able to use Loop Server API
>
> Here is drawing of what I need:
> https://docs.google.com/drawings/d/1s6F0iKSWGLN8FTNsuMvB0ebNqbofIsGcuaLEi4BINCY/edit?usp=sharing
>
> Here is what I need in words:
> 1. Log in to Firefox Account via Firefox
> 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?)
> 3. Call POST /call-url Loop Server endpoint with hawk-session-token
> derived from response in 2 step
> 4. Give generated call URL to the client
> 5. Make sure Firefox Account user sees generated URL in the Firefox
> (<<< another problem here. How to notify Firefox Account about call
> URL generated)
>
> So, it should look like:
> 1. Client click a button
> 2. Server generates a call URL on server side using support user
> Firefox Account credentials
> 3. Server passes call URL back to client
> 4. Server notifies support user Firefox Account about client generated
> call URL
>
> I have read a load of documentation, including:
> https://wiki.mozilla.org/Identity/Firefox_Accounts
> https://docs.services.mozilla.com/loop/apis.html#post-call-url
> https://github.com/mozilla-services/loop-server
> and did not find solution for that :(
>
> 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
>
>
>         POST /registration
>         <https://docs.services.mozilla.com/loop/apis.html#id17>
>
>     Associates a Simple Push Endpoint (URL) with a user. Always return
>     an hawk session token in the Hawk-Session-Token header.
>
>     *May require authentication*
>
>     You don’t /need/ 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.
>
>     This hawk session token should be derived by the client and used
>     for subsequent requests.
>
>     You can currently authenticate by sending a valid Firefox Accounts
>     assertion or a valid Hawk session.
>
>
> 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
>
> Best regards,
> Alex K.
>
>
> _______________________________________________
> Dev-fxacct mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/dev-fxacct

_______________________________________________
Dev-fxacct mailing list
[email protected]
https://mail.mozilla.org/listinfo/dev-fxacct

Reply via email to