Phu Quoc Dog
Search
⌃K

Authentication

The API supports Basic Authentication as defined in RFC2617 with a few slight differences. The main difference is that the RFC requires unauthenticated requests to be answered with 401 Unauthorized responses. In many places, this would disclose the existence of user data. Instead, the Phu Quoc Dog API responds with 404 Not Found. This may cause problems for HTTP libraries that assume a 401 Unauthorized response. The solution is to manually craft the Authorization header.
We recommend you use OAuth tokens to authenticate to the Phu Quoc Dog API.

Via username and password

Property Name
Type
Description
emailOrUsername
string
User or Email is required
password
stringi
Password is required
Sample request:
//user.json
{
"emailOrUsername" : "[email protected]",
"password": "phuuqocdogawesome",
}
curl -d user.json -H "Content-Type: application/json" -X POST https://phuquoc.dog/auth
Sample response:
// Some code
{
"message": "Successful Login",
"token": "phquucqass.fff.lLk3P7wyIVSYFZ4FNml1pT57CZUPF9hiwh3NJCAK2mU",
"expiresIn": 1565130133
}

Authenticating for SAML SSO

Note: Integrations and OAuth applications that generate tokens on behalf of others are automatically authorized.
// TODO

Working with two-factor authentication

// TODO