Closed hellais closed 3 months ago
I will soon deploy this to dev and update this to dev and provide a link to the docs for the API.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
0c9bdd9
) to head (a47beec
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This adds a new endpoint which implements a slightly nicer ooniauth API.
The main changes are the following:
/v1/user_register
-> POST/v2/ooniauth/user-login
/v1/user_login
-> POST/v2/ooniauth/user-session
withlogin_token
in the request body/v1/user_refresh_token
-> POST/v2/ooniauth/user-session
withauthentication
header set/_/account_metadata
-> GET/v2/ooniauth/user-session
So basically instead of 4 endpoints, we now have only 2:
/v2/ooniauth/user-login
(implements only POST)/v2/ooniauth/user-session
(implements both POST and GET). The POST accepts a token in body the json body or the authorization header. Token in the request body takes priority over the authorization header.