Documentation ¶
Index ¶
- type Auth
- func (a *Auth) CallbackHandler() http.Handler
- func (a *Auth) Init()
- func (a *Auth) IsAuthenticated(r *http.Request) bool
- func (a *Auth) LoginHandler() http.Handler
- func (a *Auth) LogoutHandler() http.Handler
- func (a *Auth) MayLogin(next http.Handler) http.Handler
- func (a *Auth) RequireLogin(next http.Handler) http.Handler
- func (a *Auth) User(r *http.Request) *gogithub.User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct { SessionSecret string GithubID string GithubSecret string Domain string RedirectPath string LoginPath string HomePath string Scopes []string // contains filtered or unexported fields }
func (*Auth) CallbackHandler ¶
func (*Auth) IsAuthenticated ¶
IsAuthenticated returns true if the user has a signed session cookie.
func (*Auth) LoginHandler ¶
func (*Auth) LogoutHandler ¶
func (*Auth) RequireLogin ¶
RequireLogin redirects unauthenticated users to the login route. It stores the user in the request context in case that the request is authenticated.
Click to show internal directories.
Click to hide internal directories.