remoteauthenticator

package
v1.86.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 12 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 ErrBadConfig = errors.New("invalid configuration")

Functions

This section is empty.

Types

type AuthenticationRequest

type AuthenticationRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

AuthenticationRequest is the request object that will be sent to the remote authenticator service as JSON payload in a POST request

type AuthenticationResponse

type AuthenticationResponse struct {
	// ExternalUserIdentifier is optional, if returned then the user will be used as the official username in lakeFS
	ExternalUserIdentifier *string `json:"external_user_identifier,omitempty"`
}

AuthenticationResponse is the expected response from the remote authenticator service

type Authenticator

type Authenticator struct {
	AuthService auth.Service
	Logger      logging.Logger
	Config      AuthenticatorConfig
	// contains filtered or unexported fields
}

Authenticator client

func NewAuthenticator

func NewAuthenticator(conf AuthenticatorConfig, authService auth.Service, logger logging.Logger) (*Authenticator, error)

func (*Authenticator) AuthenticateUser

func (ra *Authenticator) AuthenticateUser(ctx context.Context, username, password string) (string, error)

func (*Authenticator) String

func (ra *Authenticator) String() string

type AuthenticatorConfig

type AuthenticatorConfig struct {
	// Enabled if set true will enable authenticator
	Enabled bool
	// Endpoint URL of the remote authentication service (e.g. https://my-auth.example.com/auth)
	Endpoint string
	// DefaultUserGroup is the default group for the users authenticated by the remote service
	DefaultUserGroup string
	// RequestTimeout timeout for remote authentication requests
	RequestTimeout time.Duration
}

AuthenticatorConfig holds authentication configuration.

Jump to

Keyboard shortcuts

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