GithubHelp home page GithubHelp logo

Query string about go-jwt-middleware HOT 6 CLOSED

auth0 avatar auth0 commented on July 30, 2024
Query string

from go-jwt-middleware.

Comments (6)

drawks avatar drawks commented on July 30, 2024 1

Seems like this issue can be closed since #3 was merged?

from go-jwt-middleware.

mgonto avatar mgonto commented on July 30, 2024

Hey,

I thought of that but didn't have time yet to implement it!

I'm up to making it configurable. Maybe 3 configurations like in angular-jwt:

type: Header || Param. Defaults to Header
fieldName: Authorization
tokenType: Bearer

What do you think about it?

Thanks for offering to do a PR. We'll gladly accept it if you can do it.

Thanks again!

from go-jwt-middleware.

jfromaniello avatar jfromaniello commented on July 30, 2024

I think a func req -> token , like in express-jwt will be better.

from go-jwt-middleware.

xogeny avatar xogeny commented on July 30, 2024

@jfromaniello Could you elaborate? It seems like what you want is essentially just a middleware interface. But we already have that (at least if you are coming from negroni or martini). The question is really what to do "in the middle". The current implementation simply validates the identify of the person making the request. That is actually all I want. What I want to make configurable is where that identity is extracted from (Authorization header, query string, ...)

express-jwt actually seems to be enforcing policies as well. I don't really want to go that far (since I have my own policy enforcement layer already).

I'll put together a PR and you guys can comment on it. I'll post here when the PR is submitted (should be this morning).

from go-jwt-middleware.

xogeny avatar xogeny commented on July 30, 2024

@jfromaniello Ah! OK. Now I see your point. What you are saying is that the user could provide a function that extracts the token from the request. Got it! That's a good idea. I'll try and build on that.

from go-jwt-middleware.

mgonto avatar mgonto commented on July 30, 2024

@jfromaniello good idea.

Thanks @mtiller for the PR ;)

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.