http-jwks-example

command
v0.0.0-...-1ef0531 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 9 Imported by: 0

README

HTTP JWKS example

This is an example of how to use the http middleware with JWKS.

Using it

To try this out:

  1. Install all dependencies with go mod download
  2. Go to https://manage.auth0.com/ and create a new API.
  3. Go to the "Test" tab of the API and copy the cURL example.
  4. Run the cURL example in your terminal and copy the access_token from the response. The tool jq can be helpful for this.
  5. In the example change <your tenant domain> on line 30 to the domain used in the cURL request.
  6. Run the example with go run main.go.
  7. In a new terminal use cURL to talk to the API: curl -v --request GET --url http://localhost:3000
  8. Now try it again with the access_token you copied earlier and run curl -v --request GET --url http://localhost:3000 --header "authorization: Bearer $TOKEN" to see a successful request.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL