https://github.com/andikscript/simpleuser
Simple signup and signin with spring boot and spring security json web token
https://github.com/andikscript/simpleuser
Last synced: 5 months ago
JSON representation
Simple signup and signin with spring boot and spring security json web token
- Host: GitHub
- URL: https://github.com/andikscript/simpleuser
- Owner: andikscript
- Created: 2022-07-12T12:52:55.000Z (over 3 years ago)
- Default Branch: rate_limit
- Last Pushed: 2023-05-16T07:08:03.000Z (almost 3 years ago)
- Last Synced: 2025-01-30T00:41:21.061Z (about 1 year ago)
- Language: Java
- Homepage:
- Size: 121 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple User - Rate Limit
Simple signup and signin with spring boot json web token and rate limit
## Featured :
- Spring Boot
- Spring Security
- Spring Data JPA
- JWT Authentication & Authorization
- JWT Token
- Refresh Token
- Rate Limit (Public, User, Moderator, Admin, Root Access)
## Roles
- USER
- MODERATOR
- ADMIN
- ROOT
## API
Methods | Url | Action |
--- | --- | --- |
| POST | /api/auth/signup | signup new account |
| POST | /api/auth/signin | login an account |
| POST | /api/auth/refreshtoken | get new token from refresh token |
| GET | /api/test/all | public access content |
| GET | /api/test/user | only user access content |
| GET | /api/test/mod | only moderator access content |
| GET | /api/test/admin | only admin access content |
| GET | /api/test/root | only root access content |
## Format JSON
### Signup
```
{
"nama": "{name}",
"email": "{email}",
"username": "{username}",
"password": "{password}",
"roles": [
{
"id": {id_roles}
}
]
}
```
### Signin
```
{
"username": "{username}",
"password": "{password}",
}
```
### Refresh Token
```
{
"refreshToken": "{refreshtoken}"
}
```
## Database Relational