Documentation
¶
Index ¶
Constants ¶
View Source
const SESSION_KEY = "x-evebox-session-id"
Variables ¶
View Source
var ErrNoPassword = errors.New("no password provided")
View Source
var ErrNoUsername = errors.New("no username provided")
Functions ¶
This section is empty.
Types ¶
type AnonymousAuthenticator ¶
type AnonymousAuthenticator struct {
// contains filtered or unexported fields
}
The anonymous authenticator is used when no authentication is desired. Each http request will be authenticated with a session without having to login.
func NewAnonymousAuthenticator ¶
func NewAnonymousAuthenticator(sessionStore *sessions.SessionStore) *AnonymousAuthenticator
func (*AnonymousAuthenticator) Authenticate ¶
func (a *AnonymousAuthenticator) Authenticate(w http.ResponseWriter, r *http.Request) *sessions.Session
type AuthenticationRequiredResponse ¶
type AuthenticationRequiredResponse struct {
Types []string `json:"types"`
}
type Authenticator ¶
type UsernameAuthenticator ¶
type UsernameAuthenticator struct {
// contains filtered or unexported fields
}
func NewUsernameAuthenticator ¶
func NewUsernameAuthenticator(sessionStore *sessions.SessionStore) *UsernameAuthenticator
func (*UsernameAuthenticator) Authenticate ¶
func (a *UsernameAuthenticator) Authenticate(w http.ResponseWriter, r *http.Request) *sessions.Session
func (*UsernameAuthenticator) WriteStatusUnauthorized ¶
func (a *UsernameAuthenticator) WriteStatusUnauthorized(w http.ResponseWriter)
type UsernamePasswordAuthenticator ¶
type UsernamePasswordAuthenticator struct {
// contains filtered or unexported fields
}
func NewUsernamePasswordAuthenticator ¶
func NewUsernamePasswordAuthenticator(sessionStore *sessions.SessionStore, userStore core.UserStore) *UsernamePasswordAuthenticator
func (*UsernamePasswordAuthenticator) Authenticate ¶
func (a *UsernamePasswordAuthenticator) Authenticate(w http.ResponseWriter, r *http.Request) *sessions.Session
func (*UsernamePasswordAuthenticator) WriteStatusUnauthorized ¶
func (a *UsernamePasswordAuthenticator) WriteStatusUnauthorized(w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.