auth0jwt

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package auth0jwt is a modification of the Auth0 provided Go tutorial: https://auth0.com/docs/quickstart/backend/golang As you may guess that has several issues, but a lot of what's here has been taken verbatim.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMiddleware

func NewMiddleware(cfg Config) echo.MiddlewareFunc

Types

type Config

type Config struct {
	// Aud is used to veirfy the 'aud' claim. It's the identifier of the API in Auth0.
	Aud string
	// Iss is used to verify the 'iss' claim.
	Iss string
	// JwksPath is the path to the file like "https://my-application.auth0.com/.well-known/jwks.json".
	// See https://auth0.com/docs/tokens/concepts/jwks
	JwksPath string
}

type JSONWebKeys

type JSONWebKeys struct {
	Kty string   `json:"kty"`
	Kid string   `json:"kid"`
	Use string   `json:"use"`
	N   string   `json:"n"`
	E   string   `json:"e"`
	X5c []string `json:"x5c"`
}

type Jwks

type Jwks struct {
	Keys []JSONWebKeys `json:"keys"`
}

Jump to

Keyboard shortcuts

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