Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticationContext ¶
type AuthenticationContext interface { AuthenticateUser(login, password string) (string, error) ExcludeOperation(method, uri string) LoadUser(login, salt, hash string) error }
AuthenticationContext holds the context of all authentication operations
func NewAuthenticationMiddleware ¶
func NewAuthenticationMiddleware() (mux.MiddlewareFunc, AuthenticationContext)
NewAuthenticationMiddleware creates a new authentication context and provides a middleware func to build middleware instances
type PasswordInformation ¶
PasswordInformation consists of salt and hash
func HashPassword ¶
func HashPassword(password string) PasswordInformation
HashPassword generates random salt and calculates password hash
Click to show internal directories.
Click to hide internal directories.