REST API for Authentication
API documentation for login, logout and password reset.
Login
Returns the BEARER TOKEN which should be added in the header of all other requests using the following syntax:
-H “Authorization: Bearer ${token}”
In addition, the API will return an array of all partitions that the user has some kind of access to.
curl -X POST \
"https://system.complyon.com/api/login" \
-H "accept: application/json" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "email=${email}&password=${password}"
Parameter | Input example | Type | Mandatory |
---|---|---|---|
noreply@complyon.com | text | Yes | |
password | #MyAwesomePassword86 | text | Yes |
If successful, the API will a JSON containing the bearer token, details about the user, and a detailed list of clients:
{
"token": "ey...",
"user": {},
"clients": [
{
"id": 1,
"slug": "complyon",
"name": "Complyon"
}
]
}
Logout
Call API to manually logout the Bearer token.
curl -X POST \
"https://system.complyon.com/api/logout" \
-H "accept: application/json" \
-H "Authorization: Bearer ${token}" \
-d ""
Request password reset token
Call API to request a password reset email to be send to the defined email address. The email will contain the token needed for the actual Password reset step.
curl -X POST \
"https://system.complyon.com/api/password/email" \
-H "accept: application/json" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "email=${email}"
Parameter | Input example | Type | Mandatory |
---|---|---|---|
noreply@complyon.com | text | Yes |
Password reset
Call API to complete the password reset.
curl -X POST \
"https://system.complyon.com/api/password/reset" \
-H "accept: application/json" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "email=${email}&password=${new_password}&password_confirmation=${new_password}&token=${password_reset_token}"
Parameter | Input example | Type | Mandatory |
---|---|---|---|
noreply@complyon.com | text | Yes | |
password | #MyAwesomePassword86 | text | Yes |
password_confirmation | #MyAwesomePassword86 | text | Yes |
token | [Auto generated token provided in the password reset email] | text | Yes |