Comments (2)
Hmm...
I don't like the idea of dropping all header personally.
It's not proper RFC JWT when you eliminate headers.
But I think I can put raw_payload
into the jwtObj
when signing, so you can easily drop headers by adding few lines.
it's not working for now
-- sign
local raw_header = jwt:jwt_encode({typ="JWT", alg="HS256"})
local jwtObj = {raw_header=raw_header, payload={id=1}}
local fullJwt = jwt.sign("secret", jwtObj)
-- or you can split full jwt and replace header with "{}"
local withoutHeader = table.concat({"{}", jwtObj.raw_payload, jwtObj.signature}, ".")
-- verify
jwt.verify("secret", raw_header .. "." .. withoutHeader)
Thoughts?
from lua-resty-jwt.
I don't think you should do anything on my account, thank you.
I agree about remaining "proper".
The code provides enough for me to customize for my use case without affecting others.
Meantime I think you've done great as is. Thank you.
from lua-resty-jwt.
Related Issues (20)
- Can You Make this Compatible For Roblox Developers? i want To Use this kind Of Api To Manage Remote Events
- Validation of HS* tokens depends on the payload order HOT 1
- The token is not identical due to table not being ordered
- JWT token verification problem (undefined symbol: EVP_MD_CTX_create) HOT 1
- How the JWT is being verified?
- openidc.lua:819: authenticate(): id_token 'HS256' signature verification failed, client: 10... HOT 8
- Require alg parameter when verifying.
- "jwt.lua": HS256 signature validation fails which reason as "internal error" HOT 9
- Comment mention both x5c and x5u being defined when they are not HOT 1
- Confused about expected key format HOT 1
- Module 'resty.aes' not found: HOT 1
- Is this project still active? HOT 10
- attempt to index local 'jwt' (a userdata value) HOT 1
- jwt sgin err when typ is JWE HOT 2
- Civetweb integration
- /lua-resty-jwt/ Where is the directory? HOT 1
- With the JWT token, server/openresty returns INVALID_JWT
- [discuss] remove folder `vendor`
- Decode secret is not a valid cert\/public key HOT 1
- I encountered an error while checking the token of rs256
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 lua-resty-jwt.