oauthintro

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	httpclient.Config

	URL           string            `json:"url,omitempty"`
	Auth          ClientConfigAuth  `json:"auth,omitempty"`
	Headers       map[string]string `json:"headers,omitempty"`
	TokenTypeHint string            `json:"tokenTypeHint,omitempty"`
}

ClientConfig configures the HTTP client of the OAuth 2.0 Token Introspection ACP handler.

type ClientConfigAuth

type ClientConfigAuth struct {
	Kind   string          `json:"kind,omitempty"`
	Secret SecretReference `json:"secret,omitempty"`
	Key    string          `json:"-"`
	Value  string          `json:"-"`
}

ClientConfigAuth configures authentication to the Authorization Server.

type Config

type Config struct {
	ClientConfig   ClientConfig      `json:"clientConfig,omitempty"`
	TokenSource    token.Source      `json:"tokenSource,omitempty"`
	Claims         string            `json:"claims,omitempty"`
	ForwardHeaders map[string]string `json:"forwardHeaders,omitempty"`
}

Config configures an OAuth 2.0 Token Introspection ACP handler.

type Handler

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

Handler is an OAuth 2.0 Token Introspection ACP handler.

func NewHandler

func NewHandler(cfg *Config, polName string) (*Handler, error)

NewHandler creates a new OAuth 2.0 Token Introspection ACP Handler.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(rw http.ResponseWriter, req *http.Request)

ServeHTTP serves an HTTP request.

type SecretReference

type SecretReference struct {
	Name      string
	Namespace string
}

SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace.

Jump to

Keyboard shortcuts

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