Skip to content
Fraser Redford edited this page Mar 29, 2021 · 10 revisions

Server Login

POST: api/auth/login

This will process a login request by a user on the server allowing them to authenticate and access content. If the user has recently registered they will be required to wait until their account has been activated by a server administrator.

Request Requirements

A JSON object requiring the following:

Key Required/Optional Description
username required A username for login
password required A password for login

Sample Request

{
username:password
}

Sample Response

{
    "type": "author",
    "id": "https://team6-project-socialdistrib.herokuapp.com/author/ee786bd4483b41a2b6a01b45b94b578b",
    "host": "https://team6-project-socialdistrib.herokuapp.com/",
    "displayName": "TommyShelby",
    "url": "https://team6-project-socialdistrib.herokuapp.com/author/ee786bd4483b41a2b6a01b45b94b578b",
    "github": "https://github.com/TommyShelby"
}

Response Codes

  • 200 OK upon a successful login
  • 403 FORBIDDEN if the authentication failed, or the user is not yet activated

Clone this wiki locally