Skip to main content

Cat JWT

PyPI version

Install

pip3 install cjwt

Usage

usage: cjwt [-h] [--secret [SECRET]] [file]

positional arguments:
  file

options:
  -h, --help         show this help message and exit
  --secret [SECRET]  JWT secret

Examples

Read header and claims

  • Read from stdin
$ echo 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyLCJ0ZXN0IjoiYWJjZGVmIn0.tPJ7bVKyF_FMFQaRT6n7dvhEBnyiBRGhVlwacTsy0mI' | cjwt
alg: HS256
typ: JWT
sub: 1234567890
name: John Doe
iat: 1516239022
test: abcdef
  • Read from file
$ cjwt /tmp/jwt.txt
alg: HS256
typ: JWT
sub: 1234567890
name: John Doe
iat: 1516239022
test: abcdef
  • Read from .roadtools_auth
$ cat .roadtools_auth | cjwt
typ: JWT
nonce: <cut>
alg: <cut>
x5t: <cut>
kid: <cut>
aud: https://graph.microsoft.com/
<snip>

Verify secret

echo 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyLCJ0ZXN0IjoiYWJjZGVmIn0.tPJ7bVKyF_FMFQaRT6n7dvhEBnyiBRGhVlwacTsy0mI' | cjwt --secret 'secret'
alg: HS256
typ: JWT
sub: 1234567890
name: John Doe
iat: 1516239022
test: abcdef
echo 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyLCJ0ZXN0IjoiYWJjZGVmIn0.tPJ7bVKyF_FMFQaRT6n7dvhEBnyiBRGhVlwacTsy0mI' | cjwt --secret 'not-secret'
alg: HS256
typ: JWT
Signature verification failed

Metadata

Release files for cjwt 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cjwt 0.2.0
File Size Uploaded Provenance Actions
cjwt-0.2.0.tar.gz 2.6 kB Without provenance Details for cjwt-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cjwt 0.2.0
File Interpreter ABI Platform Actions
cjwt-0.2.0-py3-none-any.whl Python 3 none any Details for cjwt-0.2.0-py3-none-any.whl

Total release size: 5.5 kB

Release files / cjwt-0.2.0.tar.gz

Download URL cjwt-0.2.0.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c0780e9db0e34daa593e5dee9dfed530da242de7ace83a0b44d6ac66db2da2c6
BLAKE2b-256 checksum
How to use checksums
a0c205d26e5cad2584b963fc1b592a607646cc6edbb0be192e6d9cbbf27434e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.1 CPython/3.10.13 Darwin/22.6.0

Release files / cjwt-0.2.0-py3-none-any.whl

Download URL cjwt-0.2.0-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1bbfee08507b0acf6333a5348d1e3510fbca283fb79b8684425ca2993c407e6
BLAKE2b-256 checksum
How to use checksums
80108895625e35970fae72d5c9189d0c4034672ad7a5b79b8e13dd5c63407cc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.1 CPython/3.10.13 Darwin/22.6.0

Security for cjwt 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page