Documentation ¶
Index ¶
Constants ¶
View Source
const (
// NonceSize is the fixed value of the nonce used during exchange of requests
NonceSize = 20
)
Variables ¶
View Source
var ( // ErrInvalidPassword is the error returned up the stack when password is invalid ErrInvalidPassword = fmt.Errorf("invalid password") // ErrNoUser is the error returned up the stack when no user is found ErrNoUser = fmt.Errorf("no matching user") )
Functions ¶
func VerifyPassword ¶
VerifyPassword checks a password against its potential hash
Types ¶
type Authentifier ¶
Authentifier is an interface abstracting the Authenticate process
type AuthentifierFunc ¶
AuthentifierFunc is a wrapper for a function to implement the Authentifier interface
func (AuthentifierFunc) Authenticate ¶
func (af AuthentifierFunc) Authenticate(name, otp, password string) error
Authenticate wraps a function to implement Authentifier interface
type Authorizer ¶
Authorizer is an interface abstracting the Authorizer process
type AuthorizerFunc ¶
AuthorizerFunc is a wrapper for a function to implement the Authorizer interface
func (AuthorizerFunc) Authorize ¶
func (af AuthorizerFunc) Authorize(name, otp string) error
Authorize wraps a function to implement Authorizer interface
type YKAuth ¶
type YKAuth struct { zerolog.Logger ykval.Verifier yubico.UserLoader *yubico.Client NonceFunc func(int) (string, error) // contains filtered or unexported fields }
YKAuth is the base structure responsible for handling YKAuth flow
func (*YKAuth) Authenticate ¶
Authenticate tries to authenticate a user with password + otp
Click to show internal directories.
Click to hide internal directories.