file

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MPL-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKeyAuth

type APIKeyAuth struct {
	APIKey string    `json:"api_key"`
	Role   auth.Role `json:"role"`
}

type BasicAuth

type BasicAuth struct {
	Username string    `json:"username"`
	Password string    `json:"password"`
	Role     auth.Role `json:"role"`
}

type FileRealm

type FileRealm struct {
	Basic  []BasicAuth  `json:"basic"`
	APIKey []APIKeyAuth `json:"api_key"`
}

func NewFileRealm

func NewFileRealm(opts *config.FileRealmOption) (*FileRealm, error)

NewFileRealm constructs a new File Realm authenticator

func (*FileRealm) Authenticate

func (r *FileRealm) Authenticate(ctx context.Context, cred *auth.Credential) (*auth.AuthenticatedUser, error)

func (*FileRealm) GetName

func (r *FileRealm) GetName() string

Jump to

Keyboard shortcuts

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