Documentation ¶
Overview ¶
Package authenticater contains all currently implemented Authenticater.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BcryptFile ¶
type BcryptFile struct {
// contains filtered or unexported fields
}
PlainFile is a simple Authenticater which takes a file cpontaining a two dimensional JSON Array as a configuration. [
["user1", "bcrypthash_password1"], ["user2", "bcrypthash_password2"]
] A username can only be specified once. All entries must be in plain text. The hash must be a base64 encoded password. Can be generated using tools like bcrypt_password_hash (https://github.com/Top-Ranger/bcrypt_password_hash).
func (*BcryptFile) Authenticate ¶
func (bf *BcryptFile) Authenticate(user, password string) (bool, error)
Authenticate validates a user/password configuration. It is safe for parallel usage.
func (*BcryptFile) LoadConfig ¶
func (bf *BcryptFile) LoadConfig(b []byte) error
LoadConfig loads the configuration. It is assumed that this is only called once before Authenticate is called.
type PlainFile ¶
type PlainFile struct {
// contains filtered or unexported fields
}
PlainFile is a simple Authenticater which takes a file cpontaining a two dimensional JSON Array as a configuration. [
["user1", "password1"], ["user2", "password2"]
] A username can only be specified once. All entries must be in plain text
func (*PlainFile) Authenticate ¶
Authenticate validates a user/password configuration. It is safe for parallel usage.
func (*PlainFile) LoadConfig ¶
LoadConfig loads the configuration. It is assumed that this is only called once before Authenticate is called.