Documentation
¶
Overview ¶
Package oauth provides an HTTP handler to handle OAuth2 redirect and callback requests for the bebop web app.
Index ¶
- Constants
- func SetResultCookie(h *Handler, w http.ResponseWriter, res string, maxAge int)
- func SetStateCookie(h *Handler, w http.ResponseWriter, maxAge int) string
- func ValidEmailReqest(h *Handler, w http.ResponseWriter, r *http.Request, req *EmaiRequest) bool
- type Config
- type EmaiRequest
- type Handler
Constants ¶
View Source
const ( STATE_COOKIE = "bebop_oauth_state" RESULT_COOKIE = "bebop_oauth_state" )
Variables ¶
This section is empty.
Functions ¶
func SetResultCookie ¶
func SetResultCookie(h *Handler, w http.ResponseWriter, res string, maxAge int)
func SetStateCookie ¶
func SetStateCookie(h *Handler, w http.ResponseWriter, maxAge int) string
func ValidEmailReqest ¶
func ValidEmailReqest(h *Handler, w http.ResponseWriter, r *http.Request, req *EmaiRequest) bool
Types ¶
type Config ¶
type Config struct { Logger *log.Logger UserStore store.UserStore JWTService jwt.Service MountURL string CookiePath string }
Config is a configuration of an OAuth handler.
type EmaiRequest ¶
Email request signin and signup structure
type Handler ¶
type Handler struct { *Config // contains filtered or unexported fields }
Handler handles oauth2 authentication requests.
func (*Handler) AddProvider ¶
AddProvider adds a new provider to oauth handler.
Click to show internal directories.
Click to hide internal directories.