Comments (8)
ok, sounds good, will try to fix today, thank you for the feedback 👍
from jwt.
I prefer 1 just to reduce copy-paste and for an easier example/test/code maintainability. BTW, I got your point, will push slightly updated README now.
Thanks once more for the feedback 😉
from jwt.
Hi @elgs if you've any suggestions for v2 please add them here :) #39
from jwt.
Hi, this can be done via https://godoc.org/github.com/cristalhq/jwt#Signer (See Verify
method). Signing and verifying token is a pure Signer
task.
from jwt.
Thanks. It looks like I confused validate and verify. Would be great if you could add a few examples in the readme.md, like:
- how to turn a JSON string into a jwt string;
- how to verify a jwt string;
As a user, we don't want to mess with your internal types, unless necessary, in most cases, we start with a raw JSON string, and we expect a jwt string, and for verification, we start with a jwt string and a string typed secret, and expect a boolean answer.
from jwt.
Thank you so much! Last question, it would be great if you could put an example of verify in the readme.md.
from jwt.
@elgs but there is already a full example in example files (there are links in README.md)
from jwt.
The links only says build, parse, validate in the README.md, with your instruction, I figured how to get things done. There are two types of people:
- if there's example in the code, why would I bother to write them in README.md;
- if I could put examples in README.md, why would I bother users to read the code;
I fully respect each of styles. So it's fine to keep the examples in the code. Thank you so much!
from jwt.
Related Issues (20)
- docs: example code: token.Bytes undefined HOT 3
- Key size check in getHashRS() in algo_rs.go is invalid HOT 4
- The jwt format is incorrect and panic directly HOT 13
- Add clear warnings for HS256 secret length HOT 6
- JWK Set jwt.Verifier implementation HOT 7
- Crypto Go :we are a research group to help developers build secure applications. HOT 3
- IsValidAt with CustomClaims ? HOT 3
- Version v5.2.0 is breaking our code HOT 11
- Document Parse & ErrNotJWTType relation in GUIDE.md
- Rewrite fuzzing test with a new Go fuzzer from Go 1.19
- Add PASETO note in README
- Add Parsing tests
- Go Version Inconsistency HOT 2
- Optimisation causing incorrect header to encode HOT 3
- v2 preparations HOT 3
- Slow Sign HOT 18
- Cannot find package "github.com/cristalhq/jwt/v3" HOT 3
- KeyID support for RFC7517 HOT 1
- Error in readme -> Parse and verify token exemple HOT 2
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.