Server side API of the Material Assets management system.
- Java 12
- Spring Boot
- Spring Data
- Spring Security
- Gradle
- Log4j
- Lombok
- Swagger
git clone [email protected]:rednavis/maas-api.git
cd mass-api
git submodule update --init
./gradlew clean build
./gradlew bootRun
./gradlew clean htmlDependencyReport
./gradlew dependencyUpdates
./gradlew clean bootJar jibDockerBuild
http://localhost:8081/swagger-ui.html
POST: http://localhost:8081/api/auth/signup
Header
Content-Type: application/json
Body
{
"name": "lesharb",
"email": "[email protected]",
"password": "password"
}
Status: 200
Body (Created user id)
1
Status: 409
Body (Created user id)
{
"code": 409,
"message": "Email is already taken"
}
Status: 400
Body
{
"code": 400,
"message": "error message..."
}
POST: http://localhost:8081/api/auth/signin
Header
Content-Type: application/json
Body
{
"email": "[email protected]",
"password": "password"
}
Status: 200
Body
{
"accessToken": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNTQxNTA2MjA4LCJleHAiOjE1NDIxMTEwMDh9.xRU2vmXUvtHmrL_BDKm-rzTKd0Sv8BtPR3AmOO0ZgLnSXIT0EeDh1cN7lvrxM-H2fNuO4vJMJdOXV8By8E4BkQ",
"tokenType": "Bearer"
}
Status: 404
Body
{
"code": 404,
"message": "User not found [email: [email protected]]"
}
Status: 401
Body
{
"timestamp": "2020-02-20T16:16:22.136+0000",
"status": 401,
"error": "Unauthorized",
"message": "Sorry, You're not authorized to access this resource.",
"path": "/api/auth/signin"
}
Logged in user credentials
GET: http://localhost:8081/api/users/me
Header
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNTQxNTA2MjA4LCJleHAiOjE1NDIxMTEwMDh9.xRU2vmXUvtHmrL_BDKm-rzTKd0Sv8BtPR3AmOO0ZgLnSXIT0EeDh1cN7lvrxM-H2fNuO4vJMJdOXV8By8E4BkQ
Status: 200
Body
{
"id": 1,
"username": "[email protected]",
"name": "lesharb"
}
Status: 401
Body
{
"timestamp": "2020-02-20T16:26:42.886+0000",
"status": 401,
"error": "Unauthorized",
"message": "Sorry, You're not authorized to access this resource.",
"path": "/api/users/me"
}