Skip to content

Simple Oauth2 based Authorization server with inbuilt RateLimiter for creation of access tokens and their validation

License

Notifications You must be signed in to change notification settings

shivendra-kumar/Oauth2AuthorizationServer

Repository files navigation

Oauth2AuthorizationServer

Description:

Simple Oauth2 based Authorization server for creation of access tokens and their validation. Inbuilt RateLimiter for granular control of number of API calls per client.

Technology Stack:

  • Spring Boot as framework
  • Spring Security Oauth2 for client registration,generation and validation of access tokens
  • Spring Data Redis for persistence of client details and access tokens.
  • Redisson for implementation of API RateLimiter.

Demo:

  • Registration of new Client.

  • Note: client secret must be encrypted (i.e. with Bcrypt) Client Creation

  • Setting API throttling limit API throttling limit

  • Generating access token

  • Note: client secret passed in request must be decrypted one Access token generation

  • Resource Access with throttling limit of 5 requests per 2 minutes Resource Access with Throttling Limit

Usage:

  • Download the source and build it using mvn clean package
  • Run the application using java -jar Oauth2AuthorizationServer-1.0.jar
  • Rest calls can be made as shown in demo above by sending appropriate reqeusts to http://localhost:8087
  • Note: Redis server must be configured in application.properties for this app to work.

License:

License

About

Simple Oauth2 based Authorization server with inbuilt RateLimiter for creation of access tokens and their validation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages