Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/escape-dev/devise-jwt
Practice devise jwt
https://github.com/escape-dev/devise-jwt
devise-jwt kaminari pagination rack-attack
Last synced: 14 days ago
JSON representation
Practice devise jwt
- Host: GitHub
- URL: https://github.com/escape-dev/devise-jwt
- Owner: escape-dev
- Created: 2024-10-11T08:08:56.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-12-16T09:12:21.000Z (20 days ago)
- Last Synced: 2024-12-16T10:23:05.147Z (20 days ago)
- Topics: devise-jwt, kaminari, pagination, rack-attack
- Language: Ruby
- Homepage:
- Size: 62.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Explore Rails API
1. Devise JWT
2. Kaminari Pagination
3. Rack Attack (rails rate limiter)## Database Design
![devise-jwt](https://github.com/user-attachments/assets/7d086d98-f409-4345-bd60-4770ce1ce41c)## Endpoint
### Sign Up
``` POST api/v1/signup ```
```
body = {
"user": {
"email": "[email protected]",
"role": 0,
"password": "password"
}
}
```### Sign In
``` POST api/v1/signin ```
```
body = {
"user": {
"email": "[email protected]",
"password": "password"
}
}
```### Books
- create
``` POST api/v1/books ```
```
header = 'Authorization: ••••••'
body = {
"book": {
"title": "Solo Leveling",
"description": "Wage War"
}
}
```
- update
``` PUT api/v1/books/:id ```
```
header = 'Authorization: ••••••'
body = {
"book": {
"title": "Solo Leveling: Origin",
"description": "Wage War"
}
}
```
- get all
``` GET api/v1/books ```
```
header = 'Authorization: ••••••'
```
- get by id
``` GET api/v1/books/:id ```
```
header = 'Authorization: ••••••'
```
- delete
``` DELETE api/v1/books/:id ```
```
header = 'Authorization: ••••••'
```