https://github.com/andikscript/simpleusermongodb
Simple signup and signin with spring boot and spring security json web token and combine database MongoDB (NoSQL) & PostgreSQL / H2 (SQL)
https://github.com/andikscript/simpleusermongodb
Last synced: 12 months ago
JSON representation
Simple signup and signin with spring boot and spring security json web token and combine database MongoDB (NoSQL) & PostgreSQL / H2 (SQL)
- Host: GitHub
- URL: https://github.com/andikscript/simpleusermongodb
- Owner: andikscript
- Created: 2022-07-26T09:07:56.000Z (over 3 years ago)
- Default Branch: postgresql
- Last Pushed: 2022-09-27T07:43:35.000Z (over 3 years ago)
- Last Synced: 2025-01-30T00:41:21.424Z (about 1 year ago)
- Language: Java
- Homepage:
- Size: 219 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple User MongoDB (NoSQL) & PostgreSQL (SQL)
Simple signup and signin with spring boot and spring security json web token and combine database MongoDB (NoSQL) & PostgreSQL (SQL)
## Featured :
- Spring Boot
- Spring Security
- Spring Data JPA
- JWT Authentication & Authorization
- JWT Token
- Refresh Token
- MongoDB
- PostgreSQL
- Spring Mail
- Email confirmed for register
- SMS confirmed by verification code if user login
- Spring validation
- Simple Chat User
- Spring data redis
- Email queue send
- SMS queue send
## Roles
- USER
- ADMIN
- ROOT
## API
Methods | Url | Action |
--- | --- | --- |
| POST | /api/auth/signup | signup new account |
| POST | /api/auth/signin | register confirmation by email an account |
| GET | /api/auth/{verify code}/verification | login an account by verify code send to sms |
| POST | /api/auth/refreshtoken | get new token from refresh token |
| POST | /api/auth/signout | logout an account |
| GET | /api/test/all | public access content |
| GET | /api/test/user | user, admion, root access content |
| GET | /api/test/admin | admin, root 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}
"name":"{ROLE_"USER/ADMIN/ROOT"}"
}
],
"phone": "{number phone}"
}
```
### Signin
```
{
"username": "{username}",
"password": "{password}",
}
```
### Refresh Token
```
{
"refreshToken": "{refreshtoken}"
}
```