Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # AUTH SERVICE - API REFERENCE
- Every endpoint in this service is visible without previous authentication (nor token at headers).
- Each endpoints can return client/server errors (400/500).
- ## TABLE OF CONTENTS
- * New user endpoint
- * Login endpoint
- ## ENDPOINTS
- ### New User
- Creates a new user in the platform, given some credentials.
- For getting the token, you must use the *login* endpoint
- #### Endpoint
- `POST /auth/new/`
- #### Body Parameters
- * username: string
- * password: string
- #### Result
- ```js
- {
- "success": {
- "success": "User created"
- }
- }
- ```
- ### Login
- Generates a signed token, given the user credentials. It expires in 10 minutes.
- #### Endpoint
- `POST /auth/login/`
- #### Body Parameters
- * username: string
- * password: string
- #### Result
- ```js
- {
- "success": {
- "token": "<token_string>"
- }
- }
- ````
Add Comment
Please, Sign In to add comment