Jenca Authentication

Authentication Service API Endpoints

POST /logout

Log the current user out.

Response Headers:
 
Status Codes:
  • 200 OK – The current user has been logged out.
POST /signup

Sign up a new user.

Parameters:
  • email (string) – The email address of the new user.
  • password (string) – A password to associate with the given email address.
Request Headers:
 
Response Headers:
 
Response JSON Object:
 
  • email (string) – The email address of the new user.
  • password (string) – The password of the new user.
Status Codes:
  • 200 OK – A user with the given email and password has been created.
  • 409 Conflict – There already exists a user with the given email.
GET /status

Get information about the current activated user.

Request Headers:
 
Response Headers:
 
Response JSON Object:
 
  • is_authenticated (bool) – There is a current authenticated user.
  • email (string) – The email address of the current user. This is only given if there is a current authenticated user.
Status Codes:
POST /login

Log in a given user.

Parameters:
  • email (string) – An email address to log in as.
  • password (string) – A password associated with the given email address.
Request Headers:
 
Response Headers:
 
Response JSON Object:
 
  • email (string) – The email address which has been logged in.
  • password (string) – The password of the user which has been logged in.
Status Codes:
  • 200 OK – A user with the given email has been logged in.
  • 404 Not Found – No user can be found with the given email.
  • 401 Unauthorized – The given password is incorrect.
DELETE /users/(email)

Delete a particular user.

Request Headers:
 
Response Headers:
 
Response JSON Object:
 
  • email (string) – The email address of the deleted user.
Status Codes:
  • 200 OK – The user has been deleted.
  • 404 Not Found – There is no user with the given email.

Storage Service API Endpoints

POST /users

POST:

Create a new user.

Parameters:
  • email (string) – The email address of the new user.
  • password_hash (string) – A password hash to associate with the given email address.
Request Headers:
 
Response Headers:
 
Response JSON Object:
 
  • email (string) – The email address of the new user.
  • password_hash (string) – The password hash of the new user.
Status Codes:
  • 200 OK – A user with the given email and password_hash has been created.
  • 409 Conflict – There already exists a user with the given email.

GET:

Get information about all users.

Request Headers:
 
Response Headers:
 
Response JSON Array of Objects:
 
  • email (string) – The email address of a user.
  • password_hash (string) – The password hash of a user.
Status Codes:
  • 200 OK – Information about all users is returned.
GET /users

POST:

Create a new user.

Parameters:
  • email (string) – The email address of the new user.
  • password_hash (string) – A password hash to associate with the given email address.
Request Headers:
 
Response Headers:
 
Response JSON Object:
 
  • email (string) – The email address of the new user.
  • password_hash (string) – The password hash of the new user.
Status Codes:
  • 200 OK – A user with the given email and password_hash has been created.
  • 409 Conflict – There already exists a user with the given email.

GET:

Get information about all users.

Request Headers:
 
Response Headers:
 
Response JSON Array of Objects:
 
  • email (string) – The email address of a user.
  • password_hash (string) – The password hash of a user.
Status Codes:
  • 200 OK – Information about all users is returned.
DELETE /users/(email)

DELETE:

Delete a particular user.

Request Headers:
 
Response Headers:
 
Response JSON Object:
 
  • email (string) – The email address of the deleted user.
  • password_hash (string) – The password hash of the deleted user.
Status Codes:
  • 200 OK – The user has been deleted.
  • 404 Not Found – There is no user with the given email.

GET:

Get information about particular user.

Request Headers:
 
Response Headers:
 
Response JSON Object:
 
  • email (string) – The email address of the user.
  • password_hash (string) – The password hash of the user.
Status Codes:
  • 200 OK – The requested user’s information is returned.
  • 404 Not Found – There is no user with the given email.
GET /users/(email)

DELETE:

Delete a particular user.

Request Headers:
 
Response Headers:
 
Response JSON Object:
 
  • email (string) – The email address of the deleted user.
  • password_hash (string) – The password hash of the deleted user.
Status Codes:
  • 200 OK – The user has been deleted.
  • 404 Not Found – There is no user with the given email.

GET:

Get information about particular user.

Request Headers:
 
Response Headers:
 
Response JSON Object:
 
  • email (string) – The email address of the user.
  • password_hash (string) – The password hash of the user.
Status Codes:
  • 200 OK – The requested user’s information is returned.
  • 404 Not Found – There is no user with the given email.