Confirmed users
483
edits
No edit summary |
|||
Line 17: | Line 17: | ||
To obtain a signed JWT you need to make use of the users [https://github.com/fxbox/users/blob/master/doc/API.md REST API]: | To obtain a signed JWT you need to make use of the users [https://github.com/fxbox/users/blob/master/doc/API.md REST API]: | ||
* If you already have a user, you can request a new session token sending a POST request to the /login endpoint including a basic authorization header with username:password encoded in Base64 according to [http://www.ietf.org/rfc/rfc2617.txt RFC2617]. | * If you already have a user, you can request a new session token sending a POST request to the /users/login endpoint including a basic authorization header with username:password encoded in Base64 according to [http://www.ietf.org/rfc/rfc2617.txt RFC2617]. | ||
POST /login/ HTTP/1.1 | POST /users/login/ HTTP/1.1 | ||
Content-Type: application/json | Content-Type: application/json | ||
Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l | Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l | ||
* If you do not have an admin user registered in the box, you'll need to create one. To do that you need to send a POST request to the /setup endpoint with a body including the user name, user email and user password. | * If you do not have an admin user registered in the box, you'll need to create one. To do that you need to send a POST request to the /users/setup endpoint with a body including the user name, user email and user password. | ||
POST /setup/ HTTP/1.1 | POST /users/setup/ HTTP/1.1 | ||
Content-Type: application/json | Content-Type: application/json | ||
{ | { |