Documentation
¶
Index ¶
- func Authenticate(h http.Handler) http.Handler
- func AuthenticateFunc(h http.HandlerFunc) http.Handler
- func CallbackHandler(w http.ResponseWriter, r *http.Request)
- func Enabled() bool
- func Initialize(anynomous User, cookieSecret []byte)
- func LoginHandler(w http.ResponseWriter, r *http.Request)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authenticate ¶
Authenticate decorates "h" with github OAuth authentication.
func AuthenticateFunc ¶
func AuthenticateFunc(h http.HandlerFunc) http.Handler
func CallbackHandler ¶
func CallbackHandler(w http.ResponseWriter, r *http.Request)
CallbackHandler receives callback from github OAuth provider
func Initialize ¶
Initialize collects server-side credential from environment variables and prepare for authentication with Github OAuth.
Client authentication is disabled and CurrentUser always returns "anonymous" if any of the environment variables are missing.
func LoginHandler ¶
func LoginHandler(w http.ResponseWriter, r *http.Request)
LoginHandler begins github OAuth2 authentication
Types ¶
Click to show internal directories.
Click to hide internal directories.