https://github.com/dipjul/client
https://github.com/dipjul/client
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dipjul/client
- Owner: dipjul
- Created: 2020-08-21T08:55:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-01T05:35:09.000Z (over 5 years ago)
- Last Synced: 2025-01-07T21:11:43.617Z (about 1 year ago)
- Language: Java
- Size: 61.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Client
### MySql database is used
### Spring Oauth 2.0 is used for security
## REST APIs
#### POST `/auth/signin` - json {"username":"yourUsername", "password":"yourPassword"}
#### GET `/clients`
#### GET `/clients/{id}`
#### POST `/clients`
#### PUT `/clients/{id}`
#### DELETE `/clients/{id}`
#### GET `/me` - details related to your account
## For changing database:
- Change the dependencies on pom.xml file
- Change the details on src/main/resources/application.properties
## Running for the first time:
- Uncomment the below code on DataInitializer.java
Below code with create two users:
1. username:user, password:password, role:user
2. username:admin, password:password, role:admin
```java
this.users.save(User.builder()
.username("user")
.password(this.passwordEncoder.encode("password"))
.roles(Arrays.asList( "ROLE_USER"))
.build()
);
this.users.save(User.builder()
.username("admin")
.password(this.passwordEncoder.encode("password"))
.roles(Arrays.asList("ROLE_USER", "ROLE_ADMIN"))
.build()
);
```