Confirmed users
927
edits
Tarek.ziade (talk | contribs) |
|||
| Line 285: | Line 285: | ||
'''Unless stated otherwise, all APIs are using application/json for the requests and responses content types.''' | '''Unless stated otherwise, all APIs are using application/json for the requests and responses content types.''' | ||
'''POST /1.0/request_token''' | '''POST /1.0/<app_name>/request_token''' | ||
Asks for new token given some credentials. By default, the authentication mechanism is Browser ID | Asks for new token given some credentials. By default, the authentication mechanism is Browser ID | ||
but the '''X-Authentication-Protocol''' can be used to explicitly pick a protocol. If the server does not | but the '''X-Authentication-Protocol''' can be used to explicitly pick a protocol. If the server does not | ||
support the authentication protocol provided, a 400 is returned. | support the authentication protocol provided, a 400 is returned. | ||
'''app_name''' is the name of the application to access, like '''sync'''. | |||
When the authentication protocol requires something else than an Authorization header, the data is provided in | When the authentication protocol requires something else than an Authorization header, the data is provided in | ||
the request body. | the request body. | ||
| Line 297: | Line 299: | ||
<pre> | <pre> | ||
POST /request_token | POST /1.0/sync/request_token | ||
Host: token.services.mozilla.com | Host: token.services.mozilla.com | ||
Content-Type: application/json | Content-Type: application/json | ||
{ | {'assertion': XXX} | ||
</pre> | </pre> | ||