Created
August 25, 2014 12:41
-
-
Save yuikns/cee53d4a66f6346c498b to your computer and use it in GitHub Desktop.
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
## use sense | |
enroll : | |
POST /auth/enroll | |
{ | |
"name" : "yu", | |
"email" : "[email protected]", | |
"dname" : "Yu Jing", | |
"password" : "123456", | |
"title" : "nothing ", | |
"role" : 0 , | |
"address" : "tsinghua" | |
} | |
authenticate : | |
POST /auth | |
{ | |
"username": "yu", | |
"password": "123456" | |
} | |
## use curl , visit protected data | |
curl localhost:5000/ums/jwt/123/ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsImV4cCI6MTQwODk1NjEwMCwiaWF0IjoxNDA4OTU1ODAwfQ.eyJ1c2VyX2lkIjoiNTNmYWVlODE5OWI3NTdlODljZGFkN2M3In0.f5f549Q2rR04mSWvyextLSrzGXjmWtBc01Lm41jR8XQ" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment