Coder Social home page Coder Social logo

spring-jwt-gateway's Introduction

spring-jwt-gateway

A JWT based authentication api gateway based on Spring Cloud Gateway

This api gateway can be used to provide a central place to authenticate JWT token for all the back-ends services, and if the request is authenticated, this gateway will add 'X-jwt-sub=xxx' in the request http header, then all the backend services can use this customized header to do its own authorization. The 'X-jwt-sub' header value is extracted from the provided JWT token.

This is still under development until the Spring Cloud Gateway 2.0 officially released.

Road Map:

  • Support JWT RSA256 and HMAC algorithm. Right now only RSA256 is supported to verify JWT token.
  • Support to inject more JWT fields (issuer, expire_at) in the header.
  • Support official Spring Cloud Gateway 2.0.
  • Change the configuration more easy.
  • Support Docker.
  • Support Rate Limiter.

Get Started:

  • git checkout and run maven install
  • modify the application.yaml file example for your needs
  • you must provide 2 environment variables: '${jwt.issuer}' and '${jwt.audience}' when launching this app
  • then enjoy

spring-jwt-gateway's People

Contributors

csimplestring avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

spring-jwt-gateway's Issues

Consider defining a bean of type 'com.auth0.jwt.JWTVerifier' in your configuration.

start error:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
Disconnected from the target VM, address: '127.0.0.1:62095', transport: 'socket'
2018-05-31 20:15:17.522 ERROR 10627 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of constructor in com.acm.infra.proxy.JWTFilter required a bean of type 'com.auth0.jwt.JWTVerifier' that could not be found.


Action:

Consider defining a bean of type 'com.auth0.jwt.JWTVerifier' in your configuration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.