Documentation ¶
Index ¶
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 is used to keep track of users and their connections
func NewAuthenticator ¶
func NewAuthenticator() *Authenticator
NewAuthenticator constructs a new Authenticator
func (*Authenticator) CanAuthenticate ¶
func (a *Authenticator) CanAuthenticate(user core.User, hash, totp string) bool
CanAuthenticate returns a boolean based on whether the provided user has the credentials to authenticate
func (*Authenticator) Connect ¶
func (a *Authenticator) Connect(user core.User) error
Connect adds a session to the collection of active sessions
func (*Authenticator) Disconnect ¶
func (a *Authenticator) Disconnect(sessionToken string) error
Disconnect removes a session from the records for that user
func (*Authenticator) IsConnected ¶
func (a *Authenticator) IsConnected(user core.User) bool
IsConnected returns true if the specified user is logged in
Click to show internal directories.
Click to hide internal directories.