Documentation ¶
Index ¶
- type Authenticator
- func (sa *Authenticator) AddAPIKey(r *requests.Request) error
- func (sa *Authenticator) AddMfaToken(r *requests.Request) error
- func (sa *Authenticator) AddPublicKey(r *requests.Request) error
- func (sa *Authenticator) AddUser(r *requests.Request) error
- func (sa *Authenticator) AuthenticateUser(r *requests.Request) error
- func (sa *Authenticator) ChangePassword(r *requests.Request) error
- func (sa *Authenticator) Configure(fp string) error
- func (sa *Authenticator) DeleteAPIKey(r *requests.Request) error
- func (sa *Authenticator) DeleteMfaToken(r *requests.Request) error
- func (sa *Authenticator) DeletePublicKey(r *requests.Request) error
- func (sa *Authenticator) DeleteUser(r *requests.Request) error
- func (sa *Authenticator) GetAPIKeys(r *requests.Request) error
- func (sa *Authenticator) GetMfaTokens(r *requests.Request) error
- func (sa *Authenticator) GetPublicKeys(r *requests.Request) error
- func (sa *Authenticator) GetUser(r *requests.Request) error
- func (sa *Authenticator) GetUsers(r *requests.Request) error
- func (sa *Authenticator) IdentifyUser(r *requests.Request) error
- func (sa *Authenticator) LookupAPIKey(r *requests.Request) error
- type Backend
- func (b *Backend) Authenticate(r *requests.Request) error
- func (b *Backend) Configure() error
- func (b *Backend) GetConfig() string
- func (b *Backend) GetMethod() string
- func (b *Backend) GetName() string
- func (b *Backend) GetRealm() string
- func (b *Backend) Request(op operator.Type, r *requests.Request) error
- func (b *Backend) Validate() error
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
Authenticator represents database connector.
func NewAuthenticator ¶
func NewAuthenticator() *Authenticator
NewAuthenticator returns an instance of Authenticator.
func (*Authenticator) AddAPIKey ¶
func (sa *Authenticator) AddAPIKey(r *requests.Request) error
AddAPIKey adds API key for a user.
func (*Authenticator) AddMfaToken ¶
func (sa *Authenticator) AddMfaToken(r *requests.Request) error
AddMfaToken adds MFA token to a user.
func (*Authenticator) AddPublicKey ¶
func (sa *Authenticator) AddPublicKey(r *requests.Request) error
AddPublicKey adds public key, e.g. GPG or SSH, for a user.
func (*Authenticator) AddUser ¶
func (sa *Authenticator) AddUser(r *requests.Request) error
AddUser adds a user to database.
func (*Authenticator) AuthenticateUser ¶
func (sa *Authenticator) AuthenticateUser(r *requests.Request) error
AuthenticateUser checks the database for the presence of a username/email and password and returns user claims.
func (*Authenticator) ChangePassword ¶
func (sa *Authenticator) ChangePassword(r *requests.Request) error
ChangePassword changes password for a user.
func (*Authenticator) Configure ¶
func (sa *Authenticator) Configure(fp string) error
Configure check database connectivity and required tables.
func (*Authenticator) DeleteAPIKey ¶
func (sa *Authenticator) DeleteAPIKey(r *requests.Request) error
DeleteAPIKey removes API key associated with the user.
func (*Authenticator) DeleteMfaToken ¶
func (sa *Authenticator) DeleteMfaToken(r *requests.Request) error
DeleteMfaToken removes MFA token associated with the user.
func (*Authenticator) DeletePublicKey ¶
func (sa *Authenticator) DeletePublicKey(r *requests.Request) error
DeletePublicKey removes a public key, e.g. GPG or SSH, associated with the user.
func (*Authenticator) DeleteUser ¶
func (sa *Authenticator) DeleteUser(r *requests.Request) error
DeleteUser delete a specific user from database.
func (*Authenticator) GetAPIKeys ¶
func (sa *Authenticator) GetAPIKeys(r *requests.Request) error
GetAPIKeys returns a list of API keys associated with a user.
func (*Authenticator) GetMfaTokens ¶
func (sa *Authenticator) GetMfaTokens(r *requests.Request) error
GetMfaTokens returns a list of MFA token associated with a user.
func (*Authenticator) GetPublicKeys ¶
func (sa *Authenticator) GetPublicKeys(r *requests.Request) error
GetPublicKeys returns a list of public keys associated with a user.
func (*Authenticator) GetUser ¶
func (sa *Authenticator) GetUser(r *requests.Request) error
GetUser retrieves a specific user from database.
func (*Authenticator) GetUsers ¶
func (sa *Authenticator) GetUsers(r *requests.Request) error
GetUsers retrieves users from database.
func (*Authenticator) IdentifyUser ¶
func (sa *Authenticator) IdentifyUser(r *requests.Request) error
IdentifyUser returns user challenges.
func (*Authenticator) LookupAPIKey ¶
func (sa *Authenticator) LookupAPIKey(r *requests.Request) error
LookupAPIKey performs user lookup based on an API key.
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend represents authentication provider with local backend.
func NewDatabaseBackend ¶
NewDatabaseBackend return an instance of authentication provider with local backend.
func (*Backend) Authenticate ¶
Authenticate performs authentication.
func (*Backend) GetMethod ¶
GetMethod returns the authentication method associated with this backend.