A compojure-api sample utilizing token-based authentication and role-guarded routes.
Use script/init_database.sql
lein ring server-headless
Then visit http://localhost:3000/api/v1/docs/index.html
Available users: user:password
, admin:password
, poweruser:password
-
Get token via http://localhost:3000/api/v1/docs/index.html#!/auth/post_api_v1_login
-
Click 'Authorize' swagger button and enter
Token [your_token]
-
Check routes that require specific role