auth

package
v0.0.0-...-fcd971c Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	Authenticate(r *http.Request) (*Identity, error)
}

Authenticator validates HTTP requests and returns identity information.

type Basic

type Basic struct {
	Username string
	Password string
}

Basic authenticates via HTTP Basic Auth.

func (Basic) Authenticate

func (b Basic) Authenticate(r *http.Request) (*Identity, error)

Authenticate validates Basic Auth credentials.

type Forward

type Forward struct {
	SubjectHeader string
	ClaimHeaders  map[string]string
}

Forward authenticates via headers set by a reverse proxy.

func (Forward) Authenticate

func (f Forward) Authenticate(r *http.Request) (*Identity, error)

Authenticate validates the request via proxy headers.

type Identity

type Identity struct {
	Subject string
	Claims  map[string]string
}

Identity represents an authenticated user.

type None

type None struct{}

None is a no-op authenticator that always succeeds.

func (None) Authenticate

func (n None) Authenticate(r *http.Request) (*Identity, error)

Authenticate always returns success with subject "anonymous".

Jump to

Keyboard shortcuts

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