Documentation ¶
Index ¶
Constants ¶
View Source
const MethodJSONAuth settings.AuthMethod = "json"
MethodJSONAuth is used to identify json auth.
View Source
const MethodNoAuth settings.AuthMethod = "noauth"
MethodNoAuth is used to identify no auth.
View Source
const MethodProxyAuth settings.AuthMethod = "proxy"
MethodProxyAuth is used to identify no auth.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auther ¶
type Auther interface { // Auth is called to authenticate a request. Auth(r *http.Request, s users.Store, root string) (*users.User, error) // LoginPage indicates if this auther needs a login page. LoginPage() bool }
Auther is the authentication interface.
type JSONAuth ¶
type JSONAuth struct {
ReCaptcha *ReCaptcha `json:"recaptcha" yaml:"recaptcha"`
}
JSONAuth is a json implementation of an Auther.
type NoAuth ¶
type NoAuth struct{}
NoAuth is no auth implementation of auther.
type ProxyAuth ¶
type ProxyAuth struct {
Header string `json:"header"`
}
ProxyAuth is a proxy implementation of an auther.
type ReCaptcha ¶
type ReCaptcha struct { Host string `json:"host"` Key string `json:"key"` Secret string `json:"secret"` }
ReCaptcha identifies a recaptcha connection.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is a auth storage.
func NewStorage ¶
func NewStorage(back StorageBackend, userStore *users.Storage) *Storage
NewStorage creates a auth storage from a backend.
type StorageBackend ¶
StorageBackend is a storage backend for auth storage.
Click to show internal directories.
Click to hide internal directories.