Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.
/ jwterminal Public archive

a quick script pulled together to get jwt.io-like JWT debugging in your terminal

Notifications You must be signed in to change notification settings

panva/jwterminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

👨‍💻 👩‍💻

Install:

$ npm uninstall -g jwterminal
$ npm install -g panva/jwterminal

JWT Verify

Use:

$ pbpaste | jwterminal verify

# or

$ jwterminal verify --token=<JWT>

Output:

Header:
    {
      "alg": "EdDSA",
      "typ": "JWT",
      "kid": "CLjPrbijCB2z9dScRNpM1mSGOQVOIByTmd18Ft2eiAQ"
    }

Payload:
    {
      "urn:oidc-provider:example:foo": "bar",
      "jti": "cJaKmqLh8r3-FYS6QtiqH",
      "sub": "foo",
      "iat": 1562828328,
      "exp": 1562831928,
      "scope": "openid profile email",
      "iss": "https://op.panva.cz",
      "aud": "mlrmOmnSy7XGzO_UVUNnO"
    }

Signature:
    VALIDATED using

    JWK

    {
      "use": "sig",
      "kid": "CLjPrbijCB2z9dScRNpM1mSGOQVOIByTmd18Ft2eiAQ",
      "kty": "OKP",
      "crv": "Ed25519",
      "x": "lDkysGJKRmJeUp8ncTyGraHPHHiIfdxSajxGm7Srla8"
    }

    PEM

    -----BEGIN PUBLIC KEY-----
    MCowBQYDK2VwAyEAlDkysGJKRmJeUp8ncTyGraHPHHiIfdxSajxGm7Srla8=
    -----END PUBLIC KEY-----


JWT Claims:
    VALID

JWE? No problem

Use:

$ pbpaste | jwterminal decrypt --keystore path/to/jwks.json | jwterminal verify

# or

$ jwterminal decrypt --keystore path/to/jwks.json --token=<JWE> | jwterminal verify

Resources

About

a quick script pulled together to get jwt.io-like JWT debugging in your terminal

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published