Documentation
¶
Index ¶
Constants ¶
View Source
const (
AUTHENTICATED_PRINCIPAL = "AUTH_PRINCIPAL"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthManager ¶
type AuthManager struct { *mux.Router Store sessions.Store SecuredURLs []string PasswordEncoder PasswordEncoder UserDetailsService UserDetailsService AccessDeniedHanlder http.Handler // contains filtered or unexported fields }
func NewAuthManager ¶
func NewAuthManager(router *mux.Router, store sessions.Store, sessionName string, securedURLs []string, passwordEncoder PasswordEncoder, userDetailsService UserDetailsService, accessDeniedHanlder http.Handler) *AuthManager
func NewBasicAuthManager ¶
func NewBasicAuthManager() *AuthManager
func (*AuthManager) AuthenticateUser ¶
func (a *AuthManager) AuthenticateUser(w http.ResponseWriter, req *http.Request, username, rawPassword string) bool
func (*AuthManager) ClearAuthentication ¶
func (a *AuthManager) ClearAuthentication(w http.ResponseWriter, req *http.Request)
func (*AuthManager) ServeHTTP ¶
func (a *AuthManager) ServeHTTP(w http.ResponseWriter, req *http.Request)
type AuthenticatedPrincipal ¶
type AuthenticatedPrincipal string
type PasswordEncoder ¶
type UserDetails ¶
type UserDetailsService ¶
type UserDetailsService interface {
LoadUserByUsername(username string) UserDetails
}
Click to show internal directories.
Click to hide internal directories.