Code Monkey home page Code Monkey logo

Comments (5)

pascaldekloe avatar pascaldekloe commented on August 23, 2024 3

Good point. An unusual one, but valid none the less. I think this "typ" header is so lame, that it does not deserve a switch of it's own. Maybe serve with a catch-all as Claims.ExtraHeaders map[string]interface{}?

from jwt.

lusk avatar lusk commented on August 23, 2024 2

IMHO it would make debugging easier. If the validating side uses "typ": "JWT" in their headers and for some reason rejects your token as invalid, first order of business is to try to have the header and payload match EXACTLY to theirs in order to be able to rule out other possibilities before you can be sure that you are using a wrong secret for signing in the first place.

from jwt.

pascaldekloe avatar pascaldekloe commented on August 23, 2024

Of course. There needs to be a reason though.
Adding a field makes tokens larger, and I remember reading somewhere the use was depreciated.

Why would you like the typ inclusion?

from jwt.

grim-bees avatar grim-bees commented on August 23, 2024

The spec-wise mention that header type is optional, can we make it optionally available as well?

from jwt.

pascaldekloe avatar pascaldekloe commented on August 23, 2024

Yes we can. Just give me a reason to do so.

from jwt.

Related Issues (17)

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.