middleware

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2021 License: MIT Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGinAuthenticationMiddleware

func NewGinAuthenticationMiddleware(options NewJWTValidationMiddlewareOptions) gin.HandlerFunc

func NewGinIntrospectionValidationMiddleware added in v0.0.4

func NewGinIntrospectionValidationMiddleware(options *NewGinIntrospectionValidationMiddlewareOptions) gin.HandlerFunc

Types

type DiscoveryDocument

type DiscoveryDocument struct {
	DiscoveryURL          url.URL
	Algorithms            []string `json:"id_token_signing_alg_values_supported"`
	IntrospectionEndpoint string
	Issuer                string `json:"issuer"`
	JWKSURL               string `json:"jwks_uri"`
	KeyResponse           *JSONWebKeyResponse
}

func (*DiscoveryDocument) Initialize

func (document *DiscoveryDocument) Initialize() error

type JSONWebKey

type JSONWebKey struct {
	Alg string   `json:"alg"`
	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 JSONWebKeyResponse

type JSONWebKeyResponse struct {
	Keys []JSONWebKey `json:"keys"`
}

type NewGinIntrospectionValidationMiddlewareOptions added in v0.0.4

type NewGinIntrospectionValidationMiddlewareOptions struct {
	Out      io.Writer
	LogLevel logrus.Level

	DiscoveryURL *url.URL
	ClientID     string
	ClientSecret string
}

type NewJWTValidationMiddlewareOptions added in v0.0.4

type NewJWTValidationMiddlewareOptions struct {
	Out      io.Writer
	LogLevel logrus.Level

	DiscoveryURL *url.URL
}

type User

type User struct {
	Claims jwt.MapClaims
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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