auth

package
v0.0.0-...-ab6a5e4 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnauthenticated = errors.New("unauthenticated: missing or invalid Authorization header")

Functions

This section is empty.

Types

type InsecureAuthenticator

type InsecureAuthenticator struct{}

func (*InsecureAuthenticator) Authenticate

func (a *InsecureAuthenticator) Authenticate(ctx context.Context, reqHeaders http.Header, query url.Values) (auth.Session, error)

func (*InsecureAuthenticator) UpstreamAuth

func (a *InsecureAuthenticator) UpstreamAuth(r *http.Request, session auth.Session, destinationSessionID string) error

type ProxyAuthenticator

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

func NewProxyAuthenticator

func NewProxyAuthenticator(userIDClaim string) *ProxyAuthenticator

func (*ProxyAuthenticator) Authenticate

func (a *ProxyAuthenticator) Authenticate(ctx context.Context, reqHeaders http.Header, query url.Values) (auth.Session, error)

func (*ProxyAuthenticator) UpstreamAuth

func (a *ProxyAuthenticator) UpstreamAuth(r *http.Request, session auth.Session, destinationSessionID string) error

type ServiceAccountProvider

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

ServiceAccountProvider verifies Kubernetes credentials independently of the user provider. Unverified claims only select this verifier, never authority.

func NewServiceAccountProvider

func NewServiceAccountProvider(users auth.AuthProvider, reviews typedauth.TokenReviewInterface, authority string) *ServiceAccountProvider

func (*ServiceAccountProvider) Authenticate

func (p *ServiceAccountProvider) Authenticate(ctx context.Context, headers http.Header, query url.Values) (auth.Session, error)

func (*ServiceAccountProvider) UpstreamAuth

func (p *ServiceAccountProvider) UpstreamAuth(request *http.Request, session auth.Session, destinationSessionID string) error

type SimpleSession

type SimpleSession struct {
	P auth.Principal
	// contains filtered or unexported fields
}

func (*SimpleSession) Principal

func (s *SimpleSession) Principal() auth.Principal

func (SimpleSession) Token

func (s SimpleSession) Token(ctx context.Context) (string, error)

Jump to

Keyboard shortcuts

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