Sign inSign up

nwtgck/jwt-piping-server

By nwtgck

•Updated over 5 years ago

Piping Server with JWT authentication such as Auth0

Image
0

1.2K

nwtgck/jwt-piping-server repository overview

⁠jwt-piping-server

Piping Server⁠ with JWT authentication such as Auth0⁠

The demo below uses Auth0.
Piping Server with Auth0

⁠Usage

Here are examples to run server.

cd <this repo>
npm ci
npm start -- --jwks-uri https://nwtgck.us.auth0.com/.well-known/jwks.json --jwt-issuer=https://nwtgck.us.auth0.com/ --http-port=8080

OR

docker run -p 8080:8080 nwtgck/jwt-piping-server --jwks-uri https://nwtgck.us.auth0.com/.well-known/jwks.json --jwt-issuer=https://nwtgck.us.auth0.com/ --http-port=8080

Here is how to run simple web client.

cd simple-frontend/
# Static hosting
python3 -m http.server 3000

Open http://localhost:3000/⁠ on your Web browser.

⁠Change to your Auth0 setting

You can set your Auth0 domain and client_id in simple-frontend/index.html⁠.

auth0Promise = createAuth0Client({
  domain: "ooo.auth0.com",
  client_id: "............",
  cacheLocation: 'localstorage',
});

⁠Server help

Options:
  --help          Show help                                            [boolean]
  --version       Show version number                                  [boolean]
  --http-port     Port of HTTP server                            [default: 8080]
  --jwks-uri      JWKs URI (e.g.
                  https://example.us.auth0.com/.well-known/jwks.json)
                                                             [string] [required]
  --jwt-issuer    JWT issuer (e.g. https://example.us.auth0.com/)       [string]
  --jwt-audience  JWT audience                                          [string]

Tag summary

Content type

Image

Digest

Size

63 MB

Last updated

over 5 years ago

docker pull nwtgck/jwt-piping-server