Documentation ¶
Index ¶
- type Authenticator
- 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) DeleteMfaToken(r *requests.Request) error
- func (sa *Authenticator) DeletePublicKey(r *requests.Request) error
- func (sa *Authenticator) DeleteUser(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
- 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) AddMfaToken ¶ added in v1.3.4
func (sa *Authenticator) AddMfaToken(r *requests.Request) error
AddMfaToken adds MFA token to a user.
func (*Authenticator) AddPublicKey ¶ added in v1.3.3
func (sa *Authenticator) AddPublicKey(r *requests.Request) error
AddPublicKey adds public key, e.g. GPG or SSH, for a user.
func (*Authenticator) AddUser ¶ added in v1.4.7
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 ¶ added in v1.2.9
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) DeleteMfaToken ¶ added in v1.3.4
func (sa *Authenticator) DeleteMfaToken(r *requests.Request) error
DeleteMfaToken removes MFA token associated with the user.
func (*Authenticator) DeletePublicKey ¶ added in v1.3.3
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 ¶ added in v1.4.7
func (sa *Authenticator) DeleteUser(r *requests.Request) error
DeleteUser delete a specific user from database.
func (*Authenticator) GetMfaTokens ¶ added in v1.3.4
func (sa *Authenticator) GetMfaTokens(r *requests.Request) error
GetMfaTokens returns a list of MFA token associated with a user.
func (*Authenticator) GetPublicKeys ¶ added in v1.3.3
func (sa *Authenticator) GetPublicKeys(r *requests.Request) error
GetPublicKeys returns a list of public keys associated with a user.
func (*Authenticator) GetUser ¶ added in v1.4.7
func (sa *Authenticator) GetUser(r *requests.Request) error
GetUser retrieves a specific user from database.
func (*Authenticator) GetUsers ¶ added in v1.4.7
func (sa *Authenticator) GetUsers(r *requests.Request) error
GetUsers retrieves users from database.
func (*Authenticator) IdentifyUser ¶ added in v1.4.32
func (sa *Authenticator) IdentifyUser(r *requests.Request) error
IdentifyUser returns user challenges.
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 ¶ added in v1.1.3
GetMethod returns the authentication method associated with this backend.