Documentation ¶
Index ¶
Constants ¶
View Source
const ( // PathPrefix the path used by this authentication module PathPrefix = "/auth" // LoginURL is the URL which users are redirected to if they aren't logged in LoginURL = "/auth/login" )
Variables ¶
This section is empty.
Functions ¶
func CheckSession ¶
CheckSession middleware function to validate the session cookie is set
func SetGitHubConfig ¶
func SetGitHubConfig(c *GitHubConfig)
SetGitHubConfig Override the GitHub oauth configuration
Types ¶
type GitHubUser ¶
type GitHubUser struct { Name string `json:"name"` Email string `json:"email"` AvatarURL string `json:"avatar_url"` }
GitHubUser represents a user in the github API
func DecodeGitHubUser ¶
func DecodeGitHubUser(buf []byte) (*GitHubUser, error)
DecodeGitHubUser decode json into a user object
Click to show internal directories.
Click to hide internal directories.