Api docs

The user service uses django-allauth and django-rest-auth. All endpoints are generated by django-rest-auth and some additional logic is applied.

The api uri is api/v1/ and only one oauth privider is exposed as default api/v1/facebook

Examples

Getting user details without authorization token:

http http://localdocker:8000/api/v1/user/

HTTP/1.0 401 UNAUTHORIZED
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Date: Tue, 13 Oct 2015 16:08:37 GMT
Server: WSGIServer/0.1 Python/2.7.10
Vary: Accept
WWW-Authenticate: Token
X-Frame-Options: SAMEORIGIN

{
    "detail": "Authentication credentials were not provided."
}

Send the same request but with valid authorization token:

http http://localdocker:8000/api/v1/user/  "Authorization: Token 04ad1f8c93bfbdd70ad21bff1ba8c21f165dae0f"

HTTP/1.0 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Date: Tue, 13 Oct 2015 16:07:39 GMT
Server: WSGIServer/0.1 Python/2.7.10
Vary: Accept
X-Frame-Options: SAMEORIGIN

{
    "email": "user@mail.com",
    "first_name": "user",
    "last_name": "user",
    "username": "user"
}