Matt Coles лет назад: 10
Родитель
Сommit
d22e61af10
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      README.md

+ 4 - 4
README.md

44
 ### /register/
44
 ### /register/
45
 In order to register a new user account, a `POST` request should be sent, with
45
 In order to register a new user account, a `POST` request should be sent, with
46
 the following data:
46
 the following data:
47
-```
47
+```json
48
 {
48
 {
49
     "user": desired_username_here,
49
     "user": desired_username_here,
50
     "password": desired_password_here
50
     "password": desired_password_here
51
 }
51
 }
52
 ```
52
 ```
53
 The server will then respond with a JSON object that looks something like this:
53
 The server will then respond with a JSON object that looks something like this:
54
-```
54
+```json
55
 {
55
 {
56
     "registered": 1, // Value is 1 or 0 based on whether registration was
56
     "registered": 1, // Value is 1 or 0 based on whether registration was
57
     successful
57
     successful
64
 ### /login/
64
 ### /login/
65
 In order to log into an account, or essentially request a new authentication
65
 In order to log into an account, or essentially request a new authentication
66
 token, a `POST` request should be sent with the following data:
66
 token, a `POST` request should be sent with the following data:
67
-```
67
+```json
68
 {
68
 {
69
     "user": username_here,
69
     "user": username_here,
70
     "password": password_here, // Optional field if auth-key is present
70
     "password": password_here, // Optional field if auth-key is present
74
 Using the auth-key will reset and generate a new authentication key, whereas
74
 Using the auth-key will reset and generate a new authentication key, whereas
75
 password will simply get the current auth-key. In either case the following data
75
 password will simply get the current auth-key. In either case the following data
76
 will be returned:
76
 will be returned:
77
-```
77
+```json
78
 {
78
 {
79
     "logged_in": 1, // Value is 1 or 0 whether or not the login was successful
79
     "logged_in": 1, // Value is 1 or 0 whether or not the login was successful
80
     "auth-key": $2a$10$.X9YrNyd2R7b2ycAumHn.ONiINs2bCkRDupugu6sjZkUkPmXSaSra, // Only present if logged_in == 1, to be used in API requests
80
     "auth-key": $2a$10$.X9YrNyd2R7b2ycAumHn.ONiINs2bCkRDupugu6sjZkUkPmXSaSra, // Only present if logged_in == 1, to be used in API requests