forked from abramhindle/CMPUT404-project-socialdistribution
-
Notifications
You must be signed in to change notification settings - Fork 1
Register
Fraser Redford edited this page Mar 29, 2021
·
8 revisions
POST: api/auth/register
This will process a request to register a new user on the server when given a username, password, display name and github.
A JSON object requires the following:
| Key | Required/Optional | Description | | :---: | :----: | | | username | required | The server username | | password | required | The server password | | displayName | required | The name they want displayed | | github | optional | The user's github to be linked to |
{
"username": "TommyShelby",
"password": "peakyblinders",
"displayName": "TommyShelby",
"github": "http://github.com/tommyshelby"
}
{
"type": "author",
"id": "https://team6-project-socialdistrib.herokuapp.com/author/ee786bd4483b41a2b6a01b45b94b578b",
"host": "team6-project-socialdistrib.herokuapp.com",
"displayName": "TommyShelby",
"url": "https://team6-project-socialdistrib.herokuapp.com/author/ee786bd4483b41a2b6a01b45b94b578b",
"github": "https://github.com/TommyShelby"
}
-
201 Createdupon creation of an authenticated user and author -
400 Bad Requestif data is missing from the request