auth

package
v0.0.0-...-0c438d6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCallWrapper

func NewCallWrapper(opts ...Option) client.CallWrapper

NewCallWrapper creates a new call wrapper for auth handling

func NewClientWrapper

func NewClientWrapper(opts ...Option) client.Wrapper

NewClientWrapper creates a new client wrapper for auth handling

func NewHandlerWrapper

func NewHandlerWrapper(opts ...Option) server.HandlerWrapper

NewHandlerWrapper creates a new handler wrapper for authentication and authorization

Types

type Config

type Config struct {
	PublicEndpoints []string `yaml:"public_endpoints,omitempty"`
	ForwardAuth     *bool    `yaml:"forward_auth,omitempty"`
}

type Option

type Option func(*Options)

Option function for setting options

func WithAuth

func WithAuth(authImpl auth.Auth) Option

WithAuth sets the auth implementation to use

func WithConfig

func WithConfig(cfg *Config) Option

func WithForwardAuth

func WithForwardAuth(forward bool) Option

WithForwardAuth sets whether to forward auth information to downstream services

func WithPublicEndpoints

func WithPublicEndpoints(endpoints []string) Option

WithPublicEndpoints sets the list of public endpoints that don't require authentication

type Options

type Options struct {
	Auth            auth.Auth
	PublicEndpoints []string
	ForwardAuth     bool
}

Options for the auth middleware

func DefaultOptions

func DefaultOptions() Options

DefaultOptions returns default options

Source Files

  • options.go
  • wrappers.go

Jump to

Keyboard shortcuts

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