Security API

Get an authentication token that permits access to the ElasticBox API.


Token
Resource Description
POST /services/security/token Log in with email and password.
Security Providers
Resource Description
GET /services/security/providers Gets the URLs of all supported authentication providers.

POST /services/security/token

Log in with email and password. Gets the security token needed to set a cookie name 'token' for subsequent requests to be authorized.


Normal Response Codes
  • 200

Error Response Codes
  • Bad Request (400)
  • Invalid Username/Password (401)

Request parameters
Parameter Type Description
email string Specify email to uniquely identify the user.
password string User password.
Headers:
Content-Type: application/json
Body:
{ "email":"email@mailclient.com", "password":"mypassword" }
Response parameters
Parameter Type Description
token string Security token that need to be set to a cookie name 'token' for subsequent requests to be authorized.
username|mail@elasticbox.com|f81adbf2-a36b-41b9-8c7c-78f66348b3eb|member 

GET /services/security/providers

Gets the URLs of all supported authentication providers.


Normal Response Codes
  • 200

Error Response Codes
  • Bad Request (400)

Response parameters
Parameter Type Description
organization string Organization type.
github_url string The URL used to log in with a GitHub account.
password_url string The URL used to log in with an ElasticBox account using email and password.
google_url string The URL used to log in with a Google account.
icon string Security provider icon uri.
{
   "organization":"public",
   "github_url":"https://github.com/login/oauth/authorize?client_id=70d60893e7e...",
   "password_url":"https://production.elasticbox.com/services/security/token",
   "google_url":"https://accounts.google.com/o/oauth2/auth?client_id=72633695024...",
   "icon":null
}