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 (*Authenticator) String ¶
func (ra *Authenticator) String() string
type AuthenticatorConfig ¶
type AuthenticatorConfig struct { // Enabled if set true will enable authenticator Enabled bool // ExternalPrincipalAuth support external principals ExternalPrincipalsEnabled 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.
Click to show internal directories.
Click to hide internal directories.