oidc

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrServerNotRunning = fmt.Errorf("embedded OIDC server is not running")

Functions

func LoadTLSConfig

func LoadTLSConfig(caFile string) (*tls.Config, error)

func NewStaticUserProvider added in v0.7.0

func NewStaticUserProvider() *staticUserProvider

Types

type Config

type Config struct {
	ClientID     string
	ClientSecret string
	Issuer       string

	AccessTTL  time.Duration
	RefreshTTL time.Duration

	CodeChallengeMethodsSupported []string

	// CallbackURL and IssuerURL are kube-bind specific and must match API server endpoints.
	CallbackURL string
	IssuerURL   string
}

Config gives the configuration for clients to connect to the embedded OIDC server.

type Server

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

func New

func New(caBundleFile string, listener net.Listener, addrOverride string) (*Server, error)

func (*Server) AddRoutes

func (s *Server) AddRoutes(mux *mux.Router)

func (*Server) Config

func (s *Server) Config(callbackURL, issuerURL string) (*Config, error)

Config returns the OIDC configuration for clients to connect to the embedded OIDC server. It is partially auto-generated by mockoidc and partially overridden to match kube-bind specific URLs.

func (*Server) TLSConfig

func (s *Server) TLSConfig() *tls.Config

Jump to

Keyboard shortcuts

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