-
Notifications
You must be signed in to change notification settings - Fork 0
Authorization
Vadim Sokoltsov edited this page Nov 13, 2016
·
3 revisions
Sign in user and create new authorizaiton object (or update previous)
-
email- type:string- user's email -requered -
password- type:string- user's password -requered - authorization - type:
json- object with information about user's client -required
authorization object should include fields:
-
platform- information about client's OS -
platform_version- version of client's OS -
app_name- name of the client (browser version, mobile app name, etc.) -
app_version- version of the client (browser version, mobile app name, etc.) -
provider- default:UProgress- name of the application through which authorization has been completed
- email -
can't be blank,is invalid - password -
can't be blank,is too short (minimum is 6 characters) - authorization -
can't be blank
-
token- encrypted authorization token
{
"user": {
"email": "ololosh@mail.ru",
"password": "Password123",
"authorization": {
"platform": "macOS",
"platform_version": "10.11",
"app": "Google Chrome",
"app_version": "56.14.3",
"provider": "UProgress"
}
}
}{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTA0OX0.B0X5T35HnHJ_2AxoKp6CeiTTq2n_lcoHc5X7hNGdFo0"
}{
"errors": {
"email": [
"can't be blank",
"is invalid"
]
}
}