Comments (5)
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.
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.
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.
The spec-wise mention that header type is optional, can we make it optionally available as well?
from jwt.
Yes we can. Just give me a reason to do so.
from jwt.
Related Issues (17)
- Unexported errors HOT 4
- write some performance benchmark vs dgrijalva/jwt-go HOT 3
- Audiences are represented as string if claims.Set is used HOT 4
- unknown import path "crypto/ed25519" HOT 2
- Feature/example request HOT 5
- why claims.HMACSign returned token is base64 encoded? HOT 3
- Crypto Go :we are a research group to help developers build secure applications. HOT 2
- Health Care
- 👋🏽 Updated benchmark results HOT 1
- claims.Set int entries are treated as float64 HOT 1
- Microsecond Normalization HOT 3
- Use semver to support go module HOT 3
- Missing Ed25519 package HOT 6
- Remove goe dependency HOT 3
- How to encode/decode ed25519 keys HOT 3
- Abstract signing HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jwt.