-
Notifications
You must be signed in to change notification settings - Fork 2
Authentication
Kyle (Qiankang) Zhou edited this page Nov 6, 2017
·
13 revisions
/api/auth
POST
None
None
| Key | Type | Required | Description |
|---|---|---|---|
email |
String | Yes | Account Email |
password |
String | Yes | Account Password |
{
"email": "[email protected]",
"password": "foobar"
}
200 OK
{
"token": "foo123bar.foobar123.123foobar",
"user": {
"email": "[email protected]",
"id": "123456789",
"wishlist": [
{
"id": "123",
"start_date": "2013-05-14T00:01:00.234Z",
"city": "Madison",
"duration": "6 month",
"price": "1234.5",
"title": "Sample Title",
"photo_link": "http://link-to-photo"
},
{
"id": "124",
"start_date": "2013-05-14T00:01:00.234Z",
"city": "Madison",
"duration": "1 year",
"price": "1234.5",
"title": "Sample Title 2",
"photo_link": "http://link-to-photo"
}
]
}
}
400 Bad Request
{
"message": "Malformed Request"
}
401 Unauthorized
{
"message": "Invalid Email/Password Combo"
}
403 Forbidden
{
"message": "Inactive account"
}
500 Internal Server Error
{
"message": "Internal Server Error"
}
/api/auth
DELETE
None
| Key | Required | Description |
|---|---|---|
token |
Yes | Authorization Token |
None
204 No Content
204 No Content
/api/auth
GET
None
None
None
200 OK
{
"message": "This is an employee auth token for testing only.",
"token": "foo123bar.foobar123.123foobar"
}
500 Internal Server Error
{
"message": "Internal Server Error"
}