oidc

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package oidc ...

Package oidc provides functionality related OIDC based IDPs.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnexpectedSatusCode = fmt.Errorf("unexpected status code")

ErrUnexpectedSatusCode is returned when HTTP 200 is not returned.

Functions

func NewKeyFunc

func NewKeyFunc(ctx context.Context, issuer string) (jwt.Keyfunc, error)

NewKeyFunc returns a new function for getting the public JWK keys from the OIDC provider at the given issuer URL.

Types

type Config

type Config struct {
	// KubeconfigPath is a path to a kubeconfig
	KubeconfigPath string `mapstructure:"kubeconfig"`
	// IssuerURL OIDC issuer url.
	IssuerURL string `mapstructure:"issuer-url"`
	// ClientID ID of the client OIDC app.
	ClientID string `mapstructure:"client-id"`
}

Config stores configuration for the OIDC command.

type OIDC

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

OIDC describes the command to configure OIDC settings.

func NewOIDC

func NewOIDC(c Config, l *zap.SugaredLogger) (*OIDC, error)

NewOIDC returns a new OIDC struct.

func (*OIDC) Run

func (u *OIDC) Run(ctx context.Context) error

Run runs the command.

type ProviderConfig

type ProviderConfig struct {
	Issuer        string   `json:"issuer"`
	AuthURL       string   `json:"authorization_endpoint"`
	TokenURL      string   `json:"token_endpoint"`
	DeviceAuthURL string   `json:"device_authorization_endpoint"`
	JWKSURL       string   `json:"jwks_uri"`
	UserInfoURL   string   `json:"userinfo_endpoint"`
	Algorithms    []string `json:"id_token_signing_alg_values_supported"`
}

ProviderConfig contains the configuration of an OIDC provider.

Jump to

Keyboard shortcuts

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