Skip to content

An example of a microservice authorization architecture that combines JWT token requests between other microservices

License

Notifications You must be signed in to change notification settings

mamadaliev/authorization-service-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

auth-api-service

Install

To build the jar file, enter gradle build or to run the Spring Boot application, enter gradle bootRun.

$ gradle build
$ gradle bootRun

Authentication

Authentication is the act of proving an assertion, such as the identity of a computer system userModel. In contrast with identification, the act of indicating a person or thing's identity, authentication is the process of verifying that identity.

Authorization

Authorization is the function of specifying access rights/privileges to resources, which is related to information security and computer security in general and to access control in particular. More formally, "to authorize" is to define an access policy.

Demo

After running application, visit this page: 127.0.0.1:8065/auth/0.1

1. Registration

curl -X POST http://localhost:8065/auth/0.1/register
-d '{"username": "egnaf", "email": "egnaf@yahoo.com", "password": "12345678"}' 
-H "Content-Type: application/json"

2. Authentication

curl -X POST http://localhost:8065/auth/0.1/login
-d '{"username": "egnaf", "password": "12345678"}' 
-H {"Content-Type: application/json"}

3. List of users

curl -X GET http://localhost:8065/auth/0.1/users?limit=5
-H {"Content-Type: application/json", "Authorization: Bearer {token}"}

Contribute

For any problems, comments, or feedback please create an issue here.

License

Project is released under the MIT.

Releases

No releases published

Packages

No packages published

Languages