traefik_plugin_introspect

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

README

traefik-plugin-introspect

OpenId intropsection traefik plugin

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, next http.Handler, config *Config, name string) (http.Handler, error)

New created a new Demo plugin.

Types

type Config

type Config struct {
	ClientId          string   `json:"clientId,omitempty"`
	ClientSecret      string   `json:"clientSecret,omitempty"`
	RestrictedDomains []string `json:"restrictedDomains,omitempty"`
}

Config the plugin configuration.

func CreateConfig

func CreateConfig() *Config

CreateConfig creates the default plugin configuration.

type Introspect

type Introspect struct {
	// contains filtered or unexported fields
}

Intropsect an Intropsect plugin.

func (*Introspect) ServeHTTP

func (a *Introspect) ServeHTTP(rw http.ResponseWriter, req *http.Request)

type IntrospectionResponse

type IntrospectionResponse struct {
	Sub       string `json:"sub,omitempty"`
	Domain    string `json:"domain,omitempty"`
	Iss       string `json:"iss,omitempty"`
	Active    bool   `json:"active,omitempty"`
	Exp       int64  `json:"exp,omitempty"`
	TokenType string `json:"token_type,omitempty"`
	Iat       int64  `json:"iat,omitempty"`
	ClientID  string `json:"client_id,omitempty"`
	Jti       string `json:"jti,omitempty"`
}

type OpenIdConfiguration

type OpenIdConfiguration struct {
	IntrospectionEndpoint string `json:"introspection_endpoint,omitempty"`
}

Jump to

Keyboard shortcuts

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