Documentation
¶
Overview ¶
Ref: https://github.com/rqlite/rqlite/blob/master/auth/credential_store.go Package auth is a lightweight credential store. It provides functionality for loading credentials, as well as validating credentials.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credential ¶
type Credential struct { Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Perms []string `json:"perms,omitempty"` }
Credential represents authentication and authorization configuration for a single user.
type CredentialsStore ¶
type CredentialsStore struct {
// contains filtered or unexported fields
}
CredentialsStore stores authentication and authorization information for all users.
func NewCredentialsStore ¶
func NewCredentialsStore() *CredentialsStore
NewCredentialsStore returns a new instance of a CredentialStore.
func (*CredentialsStore) Check ¶
func (c *CredentialsStore) Check(username, password string) bool
Check returns true if the password is correct for the given username.
Click to show internal directories.
Click to hide internal directories.