Преглед на файлове

fix(docs): updating token documentation

Peter Thomassen преди 5 години
родител
ревизия
7970132e37
променени са 2 файла, в които са добавени 8 реда и са изтрити 3 реда
  1. 7 2
      docs/auth/account.rst
  2. 1 1
      docs/auth/tokens.rst

+ 7 - 2
docs/auth/account.rst

@@ -141,9 +141,14 @@ email address and password to the ``/auth/login/`` endpoint::
         '{"email": "youremailaddress@example.com", "password": "yourpassword"}'
 
 If email address and password match our records, the server will reply with
-``201 Created`` and send you the token as part of the response body::
+``200 OK`` and return the token in the ``token`` field of the response body::
 
-    {"auth_token": "i-T3b1h_OI-H9ab8tRS98stGtURe"}
+    {
+        "created": "2018-09-06T09:07:43.762697Z",
+        "id": "8f9cbae2-c862-48a4-b3f0-2cb1a80df168",
+        "token": "f07Q0TRmEb-CRWPe4h64_iV2jbet",
+        "name": "login"
+    }
 
 In case of credential mismatch, the server replies with ``401 Unauthorized``.
 

+ 1 - 1
docs/auth/tokens.rst

@@ -63,7 +63,7 @@ will reply with ``201 Created`` and the created token in the response body::
     {
         "created": "2018-09-06T09:08:43.762697Z",
         "id": "3a6b94b5-d20e-40bd-a7cc-521f5c79fab3",
-        "token": "4pnk7u+NHvrEkFzrhFDRTjGFyX+S",
+        "token": "4pnk7u-NHvrEkFzrhFDRTjGFyX_S",
         "name": "my new token"
     }