Comments (8)
I would also love to get header parameters support. Right now I have no way of extracting kid from google provided jwt and therefore I don't know which key to use to verify the signature (google jwt structure: https://firebase.google.com/docs/auth/admin/verify-id-tokens).
What's the ETA on fixing this bug?
from libjwt.
Can you elaborate on what "kid header parameter" is?
Also, check.h is in GNU Check library. You need that in order to compile the test suite (make check
)
from libjwt.
I just looked into this. What I really need to do is allow arbitrary header values. Something that LibJWT doesn't do, at the moment.
from libjwt.
kid is an optional header in JWS standard RFC7515:
4.1.4. "kid" (Key ID) Header Parameter
The "kid" (key ID) Header Parameter is a hint indicating which key
was used to secure the JWS. This parameter allows originators to
explicitly signal a change of key to recipients. The structure of
the "kid" value is unspecified. Its value MUST be a case-sensitive
string. Use of this Header Parameter is OPTIONAL.
When used with a JWK, the "kid" value is used to match a JWK "kid"
parameter value.
a typical Apple Music Developer Token payload is like:
{
"alg": "ES256",
"kid": "ABC123DEFG"
}
{
"iss": "DEF123GHIJ",
"iat": 1437179036,
“exp”: 1493298100
}
For now I will just modify the source by adding a new function with additional parameter based on jwt_encode(). But for the future, it is nice to have the feature for libjwt to be able to add optional headers.
from libjwt.
Hi Ben!
I added a command line utility program amdevtok on the base of libjwt. Modified jwt.h/jwt.c to add 2 customized functions. The work is in a clone: https://github.com/noisy62/amdevtok/blob/master/amdevtok.diff.
IMHO, it will be useful to expand the jwt_t structure to accommodate optional header parameters.
But for this sole purpose of Apple Music Developer Token creation, a little hack is enough. Thanks for your work!!!
from libjwt.
#71 Please review and see if this is useful
from libjwt.
This is resolved with some commits that were just merged.
from libjwt.
Great, thanks!
from libjwt.
Related Issues (20)
- NEWS file? HOT 3
- Compile error in C++ code HOT 3
- jansson.h is missing HOT 4
- Compiling under SSL 3.x triggers warnings. HOT 4
- fatal error: jwt.h: No such file or directory HOT 2
- missing `libjwt-1.15.3.tar.gz` for 1.15.3 release HOT 1
- JWT: jwt_encode_str() function return only three characters. HOT 4
- jwt_decode returns 22 HOT 81
- ./confugre not working HOT 1
- Correct package on Debian 12 HOT 6
- Is 1.16.0 stable? HOT 2
- Upgrade `m4/doxygen.m4` to `ax_prog_doxygen.m4` from GNU Autoconf Archive? HOT 2
- Failed to parse JWT HOT 1
- Error parsing fractional values in JWT exp HOT 3
- Native windows build HOT 1
- finalize mbedTLS support HOT 2
- Building 1.17.0 fails on aarch64
- Plans to upload more recent versions to older distribution repositories HOT 1
- Issue seen while using jwt_decode api HOT 3
- String format is different for a property between jwt_get_grants_json and jwt_get_grant HOT 6
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 libjwt.