extauthz

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderForwardedClientCert = "x-forwarded-client-cert"
	HeaderAuthorization       = "authorization"
)
View Source
const (
	User          userType = "user"
	TechnicalUser userType = "technical-user"
	System        userType = "system"
)
View Source
const (
	UNKNOWN checkResultCode = iota
	ALLOWED
	DENIED
	UNAUTHENTICATED
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

func NewServer

func NewServer(signingKeyFunc SigningKeyFunc, opts ...ServerOption) (*Server, error)

NewServer creates a new server and applies the given options.

func (*Server) Check

Check processes the JWT token and/or client certificate to authorize the request.

type ServerOption

type ServerOption func(*Server) error

ServerOption is used to configure a server.

func WithEnrichHeaderWithRegion

func WithEnrichHeaderWithRegion(b bool) ServerOption

func WithEnrichHeaderWithType

func WithEnrichHeaderWithType(b bool) ServerOption

func WithJWTHandler

func WithJWTHandler(hdl *jwthandler.Handler) ServerOption

func WithPolicyEngine

func WithPolicyEngine(pe policyEngine) ServerOption

func WithTrustedSubjects

func WithTrustedSubjects(m map[string]string) ServerOption

type SigningKeyFunc

type SigningKeyFunc func() (string, *rsa.PrivateKey, error)

SigningKeyFunc is a function that returns a private key and its ID.

Jump to

Keyboard shortcuts

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