https://github.com/kvbc/user-login-app
User login app build with front-end communicating with Spring back-end through REST API
https://github.com/kvbc/user-login-app
Last synced: 10 months ago
JSON representation
User login app build with front-end communicating with Spring back-end through REST API
- Host: GitHub
- URL: https://github.com/kvbc/user-login-app
- Owner: kvbc
- License: mit
- Created: 2022-06-05T13:39:38.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-05T14:41:14.000Z (about 4 years ago)
- Last Synced: 2025-10-11T23:31:56.054Z (10 months ago)
- Language: Java
- Size: 50.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# user-login-app

The .css is 99.9% stolen
### Spring dependencies
- Spring Web
- Spring Security
- Spring Data JPA
- MySQL Driver
- Lombok
### SQL Table
```sql
CREATE TABLE users(
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
login VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL
);
```
### REST API
Retrieve the information of user with the ID of **MY_ID**
`curl -X GET http://localhost:8080/api/user/MY_ID`
Retrieve the list of all registered users
`curl -X GET http://localhost:8080/api/user`
Delete all registered users
`curl -X DELETE http://localhost:8080/api/user`
Register user **MY_LOGIN** with password **MY_PASSWORD**
`curl -X POST -H "Content-type: application/json" -d "{\"login\":\"MY_LOGIN\",\"password\":\"MY_PASSWORD\"}" http://localhost:8080/api/user/register`
Login as user **MY_LOGIN** with password **MY_PASSWORD**
`curl -X POST -H "Content-type: application/json" -d "{\"login\":\"MY_LOGIN\",\"password\":\"MY_PASSWORD\"}" http://localhost:8080/api/user/login`
Delete user **MY_LOGIN** with password **MY_PASSWORD**
`curl -X POST -H "Content-type: application/json" -d "{\"login\":\"MY_LOGIN\",\"password\":\"MY_PASSWORD\"}" http://localhost:8080/api/user/delete`