Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGitHubOAuth ¶
Types ¶
type AuthContext ¶
type Provider ¶
type Provider interface { // Protect is a middleware to protect a page to unauthorized access Protect(http.HandlerFunc) http.HandlerFunc // Redirect is the function that is called on a callback Redirect(w http.ResponseWriter, r *http.Request) // GetAuthContext should return the current AuthContext GetAuthContext(r *http.Request) (AuthContext, error) // Login should login a user and maybe redirect the request to a IDP Login(w http.ResponseWriter, r *http.Request) // Logout should logout a user and delete the session Logout(w http.ResponseWriter, r *http.Request) // DisplayLogin should return true if a login should be doable. DisplayLogin() bool }
func NewDummyAuth ¶
func NewDummyAuth() Provider
NewDummyAuth returns a dummy implementation that implements the authentication interface but with a dummy user. This auth method should only be used for local development
Click to show internal directories.
Click to hide internal directories.