Simple signup and signin with spring boot json web token and rate limit
- Spring Boot
- Spring Security
- Spring Data JPA
- JWT Authentication & Authorization
- JWT Token
- Refresh Token
- Rate Limit (Public, User, Moderator, Admin, Root Access)
- USER
- MODERATOR
- ADMIN
- ROOT
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 |
{
"nama": "{name}",
"email": "{email}",
"username": "{username}",
"password": "{password}",
"roles": [
{
"id": {id_roles}
}
]
}
{
"username": "{username}",
"password": "{password}",
}
{
"refreshToken": "{refreshtoken}"
}