Comments (4)
@erhhung I didn't experience that argument as required. Can you post an example usage?
from jwt-cli.
The version I ran was v3.2.1 as that was the latest published in Homebrew (and still is).
I just manually pulled down v3.3.0 and ran my example again, and I still see the issue:
./jwt --version
jwt 3.3.0
Full example:
$ ./jwt encode \
--iss https://foo.com \
--aud https://bar.com \
--sub john.doe \
-P "jti=$(uuidgen)" \
-P "[email protected]" \
--exp "+1 hr" \
--secret secret
error: The following required arguments were not provided:
--prn <principal>
USAGE:
jwt encode --alg <algorithm> --aud <audience> --exp <expires> --iss <issuer> --prn <principal> --secret <secret> --sub <subject>
Minimal example:
$ ./jwt encode --aud https://bar.com --secret secret
error: The following required arguments were not provided:
--prn <principal>
USAGE:
jwt encode --alg <algorithm> --aud <audience> --exp <expires> --prn <principal> --secret <secret>
Full example without --aud
option:
$ ./jwt encode \
--iss https://foo.com \
--sub john.doe \
-P "jti=$(uuidgen)" \
-P "[email protected]" \
--exp "+1 hr" \
--secret secret
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6ImpvaG4uZG9lQGZvby5jb20iLCJleHAiOjE2MTMxNTI1NjUsImlhdCI6MTYxMzE0ODk2NSwiaXNzIjoiaHR0cHM6Ly9mb28uY29tIiwianRpIjoiMzUwOWNkNjgtNTI3OC00NmRlLTllODQtZmVjYzAyM2I0NGE2Iiwic3ViIjoiam9obi5kb2UifQ.0BKPhlWe41JVX_7mOLrAJJ1SfW1aAOcLw1P3y05psKU
from jwt-cli.
Thanks @erhhung! I'm not sure which spec I read when I first created this tool, but prn
was required if aud
was present at the time. According to the current spec that you mentioned, however, it doesn't even seem to be specified. I'll remove it.
from jwt-cli.
Removed in 4.0.0
from jwt-cli.
Related Issues (20)
- Feature Request: Support plaintext payload HOT 1
- Tests not in `main_test.rs' don't run HOT 1
- Unsecured JWT HOT 4
- `--secret` flag treats all values as file paths HOT 4
- Feature Request: encode allow none `typ` HOT 2
- linux binary for jwt 5.0.3 does not run on CentOS 7 HOT 8
- Add support for TTL when generating JWTs HOT 3
- Improve documentation for using elliptic curve keys HOT 1
- Allow the `typ` header field to have values other than `JWT` HOT 1
- encode always errors with "Invalid JSON provided!" on 6.0.0 HOT 2
- Bug: Error running on Fedora Linux in Docker on Apple ARM silicon HOT 1
- missing ES512 HOT 1
- Bump jsonwebtoken to v8.3.0 to v9.x.x HOT 2
- bug: not able to use in macOS for Apple Silicon chip HOT 7
- Brew formula does not work with linuxbrew HOT 2
- Shell completion
- App crash on `jwt encode` command with `@` in secret HOT 1
- Error: version `GLIBC_2.33' not found HOT 1
- Add option to ignore alg type HOT 2
- Add completions support for nushell
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-cli.