https://github.com/valandro/spring-auth
A JWT (json web token) authentication server using Java, Spring Framework, Gitlab CI/CD and more. :lock:
https://github.com/valandro/spring-auth
java jwt jwt-auth jwt-authentication spring
Last synced: 30 days ago
JSON representation
A JWT (json web token) authentication server using Java, Spring Framework, Gitlab CI/CD and more. :lock:
- Host: GitHub
- URL: https://github.com/valandro/spring-auth
- Owner: valandro
- License: mit
- Created: 2018-10-16T10:46:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-18T11:52:53.000Z (over 7 years ago)
- Last Synced: 2025-03-29T09:41:39.599Z (about 1 year ago)
- Topics: java, jwt, jwt-auth, jwt-authentication, spring
- Language: Java
- Homepage:
- Size: 601 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://opensource.org/licenses/MIT)
# Java Spring Data
Continuous integration status:
[](https://travis-ci.org/valandro/spring-auth.svg?branch=master)
[](https://codecov.io/gh/valandro/java-auth-spring)
This project consists in an Authentication Service, using Jwts for generate JSON Web Tokens.
### HTTP Methods
**POST**
Request Body
```json
{
"username": "some-user",
"password": "some-pass"
}
```
Response - **Status 200 OK**
```json
{
"token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ7XCJjbGllbnRJZFwiOjEsXCJhY2Nlc",
"user_name": "Lucas",
"access_level": 1
}
```
Response - **Status 404 NOT FOUND**
```json
{
"httpStatus": 404,
"message": "Usuário não encontrado."
}
```
### Sequence Diagram

### Data model
The database used in this project has the following structure:
| COLUMNS | TYPE | EXTRA |
| ------------| ------------| ----------|
| id | INT(11) | AI, PK, NN|
| id_client | INT(11) | NN |
| name | VARCHAR(255)| NN |
| password | VARCHAR(255)| NN |
| access_level| INT(11) | NN |
| blocked | INT(11) | NN |
### Environment
- Java JDK 10
- Gradle 4.3 or higher
### Dependencies
- **H2 Memory Database** for integration tests
- **Spring Cloud Config** for centralize properties
### License
MIT License. [Click here for more information.](LICENSE)