GithubHelp home page GithubHelp logo

jwt-inspector's Introduction

jwt-inspector - inspect your JWTs

jwt-inspector is an service that consumes JWT bearer tokens, validates them using a provided JWKS URI, and echoes the JWT payload in the response.

Getting started

jwt-inspector is a Go service. To install it, use go build or run:

go install github.com/jnschaeffer/jwt-inspector@latest

Usage

To run jwt-inspector, set the JWKS_URI environment variable to the URI containing the JWKS you want to validate tokens against and run the binary:

JWKS_URI=https://example.com/.well-known/jwks.json jwt-inspector

You can also set the listening address for the service using the ADDR environment variable.

Once running, jwt-inspector will accept requests on / and echo JWT payloads.

The following example should give you an idea of how to use the service:

$ read -s AUTH_TOKEN
$ curl -s --oauth2-bearer "$AUTH_TOKEN" http://localhost:8000/ | jq
{
  "aud": "https://auth.example.com/",
  "exp": 1674233937,
  "iat": 1674147537,
  "iss": "https://auth.example.com/",
  "scope": "openid profile email",
  "sub": "0e5ed04b-d67f-4559-9ee6-46567cfd16da"
}

jwt-inspector's People

Contributors

jnschaeffer avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.