https://github.com/b-ryan/auth-demo
Demo of auth(n|z) using buddy
https://github.com/b-ryan/auth-demo
Last synced: 11 months ago
JSON representation
Demo of auth(n|z) using buddy
- Host: GitHub
- URL: https://github.com/b-ryan/auth-demo
- Owner: b-ryan
- License: epl-1.0
- Created: 2016-03-23T16:49:18.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-23T16:50:29.000Z (about 10 years ago)
- Last Synced: 2025-01-10T20:53:02.565Z (over 1 year ago)
- Language: Clojure
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# auth-test
## Usage
```
lein run
```
## Sample Output
```
GET /clients/:client-id/resources | token: gibberish_token | params: {:client-id 2} | result: 401: invalid token
GET /clients/:client-id/resources | token: client_2_admin_token | params: {:client-id 2} | result: 200: CLIENT
GET /clients/:client-id/resources | token: client_2_normal_token | params: {:client-id 2} | result: 200: CLIENT
GET /clients/:client-id/resources | token: backend_process_token | params: {:client-id 2} | result: 200: CLIENT
GET /clients/:client-id/resources | token: gibberish_token | params: {:client-id 3} | result: 401: invalid token
GET /clients/:client-id/resources | token: client_2_admin_token | params: {:client-id 3} | result: 403: wrong client
GET /clients/:client-id/resources | token: client_2_normal_token | params: {:client-id 3} | result: 403: wrong client
GET /clients/:client-id/resources | token: backend_process_token | params: {:client-id 3} | result: 200: CLIENT
POST /resource | token: gibberish_token | params: {} | result: 401: invalid token
POST /resource | token: client_2_admin_token | params: {} | result: 201: NEW
POST /resource | token: client_2_normal_token | params: {} | result: 403: roles mismatch
POST /resource | token: backend_process_token | params: {} | result: 201: NEW
GET /resources | token: gibberish_token | params: {} | result: 401: invalid token
GET /resources | token: client_2_admin_token | params: {} | result: 403: roles mismatch
GET /resources | token: client_2_normal_token | params: {} | result: 403: roles mismatch
GET /resources | token: backend_process_token | params: {} | result: 200: ALL
```