Last active
December 29, 2015 12:49
-
-
Save namsral/7673054 to your computer and use it in GitHub Desktop.
Account Authentication Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST /api/authenticate | |
> Content-Type: application/x-www-form-urlencoded | |
> | |
user=lars,pass=secret | |
< 200 OK | |
< | |
{ | |
"token": "897ca80f3443de1ad9c0ce8f9d7c4449c68606e0" | |
} | |
GET /api/whoami | |
> Authorization: 897ca80f3443de1ad9c0ce8f9d7c4449c68606e0 | |
< 200 OK | |
< Content-Type: application/json; charset=utf-8 | |
{ | |
"user": ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment