Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/masakdirt/clear_solutions_techtask
https://github.com/masakdirt/clear_solutions_techtask
authorization docker-compose java javacore jwt-token maven postgresql refresh-token spring springboot springsecurity
Last synced: about 6 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/masakdirt/clear_solutions_techtask
- Owner: MasakDirt
- Created: 2024-04-24T23:50:13.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-02T18:40:34.000Z (7 months ago)
- Last Synced: 2024-05-03T14:35:23.039Z (7 months ago)
- Topics: authorization, docker-compose, java, javacore, jwt-token, maven, postgresql, refresh-token, spring, springboot, springsecurity
- Language: Java
- Homepage:
- Size: 53.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Documentation for Clear Solutions Task
## Prerequisites
- Java 17 or higher
- Docker Desktop## Initializing the Database
- How to initialize the database I describe in those file: [docker-db-initialization](Postgres_Docker_Init.md)## Running the Web Application
1. Start Docker container;
2. Start Application: [ClearSolutionsApplication🟢](src%2Fmain%2Fjava%2Ftech%2Ftask%2Fclearsolutions%2FClearSolutionsApplication.java);
3. The application will be available at: `http://localhost:8080`.## Endpoints
### Authentication (/api/v1/auth)
- **POST /signup**: Register a user. Accepts [UserCreateRequest](src%2Fmain%2Fjava%2Ftech%2Ftask%2Fclearsolutions%2Fdto%2FUserCreateRequest.java)(date format: `dd.MM.yyyy`), checks users birthdate for valid. Returns User Response.
- **POST /login**: Authenticate a user. Accepts [LoginRequest](src%2Fmain%2Fjava%2Ftech%2Ftask%2Fclearsolutions%2Fdto%2FLoginRequest.java). Return user with access and refresh token.
- **POST /refresh-token**: Refresh access token. Accepts [TokenRefreshRequest.java](src%2Fmain%2Fjava%2Ftech%2Ftask%2Fclearsolutions%2Fdto%2FTokenRefreshRequest.java). Return access and refresh token.### Users (/api/v1/user)
- **PATCH /special-fields**: Update special fields. Accepts [UserSpecialFieldsUpdate](src%2Fmain%2Fjava%2Ftech%2Ftask%2Fclearsolutions%2Fdto%2FUserSpecialFieldsUpdate.java), checks users birthdate for valid. Available only for same users!
- **PUT**: Update all users fields. Accepts [UserUpdateRequest](src%2Fmain%2Fjava%2Ftech%2Ftask%2Fclearsolutions%2Fdto%2FUserUpdateRequest.java)(date format: `dd.MM.yyyy`),, checks users birthdate for valid. Available only for same users!
- **DELETE /{id}**: Delete user. Accepts **id**. Available only for same users!
- **GET**: Get a list of users by dates. Accepts dates '_from_' and '_to_' (format: `yyyy-MM-dd`). All users has access!### Logout
- **POST /api/v1/logout**: Logout user from system, if he authenticated. Return String.## Swagger Documentation
- To check swagger documentation you can follow this link, while Application is running: http://localhost:8080/swagger-ui/index.html