Giter Site home page Giter Site logo

Comments (7)

ewanharris avatar ewanharris commented on June 26, 2024 1

Thanks for filing this issue, and apologies for our delay in replying.

We'd definitely like to explore supporting gRPC in some manner in this library but I think given the changes that might require we'd look to potentially restructure this package and cut a new major.

For now it might be best to maybe document the existing usage of jwtValidator.ValidateToken you've described similar to the gin example we have in the repo, demonstrating how to create an interceptor for grpc-go that extracts a token and validates it.

from go-jwt-middleware.

ewanharris avatar ewanharris commented on June 26, 2024 1

We maintain an examples folder in the repo that would be the place to add it. You can check out one of the other folders in there as an example of the structure that should be followed

from go-jwt-middleware.

kingscott avatar kingscott commented on June 26, 2024 1

@mthssan-toast Hey! I haven't been able to put the example together, but I'll do my best to get to it in the next few weeks.

from go-jwt-middleware.

darvid7 avatar darvid7 commented on June 26, 2024

+1

from go-jwt-middleware.

kingscott avatar kingscott commented on June 26, 2024

Thanks for filing this issue, and apologies for our delay in replying.

We'd definitely like to explore supporting gRPC in some manner in this library but I think given the changes that might require we'd look to potentially restructure this package and cut a new major.

For now it might be best to maybe document the existing usage of jwtValidator.ValidateToken you've described similar to the gin example we have in the repo, demonstrating how to create an interceptor for grpc-go that extracts a token and validates it.

Thanks for the reply, @ewanharris. Sorry for the delay on my response as well!

That's not a bad idea. I was able to implement this flow at my company, but just results in some duplicate code since we have both http and grpc flows. I'll try to pick this up when I get a moment.

If I were to put up a PR for this documentation, where should this be added? Thanks.

from go-jwt-middleware.

mthssan-toast avatar mthssan-toast commented on June 26, 2024

@kingscott Hi there! Were you ever able to put together an example of how to use this middleware in a gRPC environment?

from go-jwt-middleware.

kingscott avatar kingscott commented on June 26, 2024

Submitted a PR here: #244. Let me know if there's anything else you'd like to see here @ewanharris. I tried to be as explicit as possible.

from go-jwt-middleware.

Related Issues (20)

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.