https://github.com/davydovanton/grape-rodauth
Simple grape app with rodauth
https://github.com/davydovanton/grape-rodauth
example-project grape roda rodauth
Last synced: 7 months ago
JSON representation
Simple grape app with rodauth
- Host: GitHub
- URL: https://github.com/davydovanton/grape-rodauth
- Owner: davydovanton
- Created: 2016-10-09T20:11:35.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-11T21:17:19.000Z (over 8 years ago)
- Last Synced: 2024-10-19T14:41:44.033Z (8 months ago)
- Topics: example-project, grape, roda, rodauth
- Language: Ruby
- Size: 3.91 KB
- Stars: 4
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Grape + rodauth = <3
This repository is example how you can integrate [rodauth](http://rodauth.jeremyevans.net) to [grape](https://github.com/ruby-grape/grape) app## how to use it
1. create table for rodauth
2. start the server
3. send this requests```
curl -v -H "Accept: application/json" -H "Content-Type: application/json" -d '{"login":"[email protected]", "password":"password" }' -X POST http://localhost:9292/login
```After that you need to get `Authorization` header value and send next request with this value:
```
curl -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY2NvdW50X2lkIjozfQ.QrWSnSlknpfczTUK6IN_Nzc_mYhaSaKi95sts_c6P3U" -X GET http://localhost:9292/api/hello.json
```