Skip to content

A quick start compojure-api app containing custom token authentication

Notifications You must be signed in to change notification settings

ksuandi/role-based-auth-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

role-based-auth-api

A compojure-api sample utilizing token-based authentication and role-guarded routes.

Create the MySQL database for local development

Use script/init_database.sql

Running Locally

lein ring server-headless

Then visit http://localhost:3000/api/v1/docs/index.html

Try API!

Available users: user:password, admin:password, poweruser:password

  1. Get token via http://localhost:3000/api/v1/docs/index.html#!/auth/post_api_v1_login

  2. Click 'Authorize' swagger button and enter Token [your_token]

  3. Check routes that require specific role

About

A quick start compojure-api app containing custom token authentication

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published