Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService interface {
OAuthHandler
CurrentUser(req *http.Request) (*User, error)
LoadUserData(token *oauth2.Token, req *http.Request, res http.ResponseWriter) (*User, error)
}
An AuthService wraps OAuth and a access to the current user.
type OAuthHandler ¶
type OAuthHandler interface {
Start(res http.ResponseWriter, req *http.Request) error
Callback(res http.ResponseWriter, req *http.Request, beforeWriteCallback func(*User) error) error
Destroy(res http.ResponseWriter, req *http.Request) error
}
An OAuthHandler is responsible of providing the callbacks to interact with an OAuth provider.
Click to show internal directories.
Click to hide internal directories.