Documentation ¶
Index ¶
- func CallbackHandler(w http.ResponseWriter, r *http.Request)
- func ClaimsFromJWT(jwt string) (jwtmanager.VouchClaims, error)
- func Configure()
- func FindJWT(r *http.Request) string
- func HealthcheckHandler(w http.ResponseWriter, r *http.Request)
- func LoginHandler(w http.ResponseWriter, r *http.Request)
- func LogoutHandler(w http.ResponseWriter, r *http.Request)
- func ValidateRequestHandler(w http.ResponseWriter, r *http.Request)
- func VerifyUser(u interface{}) (bool, error)
- type AuthError
- type Index
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallbackHandler ¶ added in v0.2.1
func CallbackHandler(w http.ResponseWriter, r *http.Request)
CallbackHandler /auth - validate info from oauth provider (Google, GitHub, OIDC, etc) - create user - issue jwt in the form of a cookie
func ClaimsFromJWT ¶
func ClaimsFromJWT(jwt string) (jwtmanager.VouchClaims, error)
ClaimsFromJWT parse the jwt and return the claims
func FindJWT ¶
FindJWT look for JWT in Cookie, JWT Header, Authorization Header (OAuth2 Bearer Token) and Query String in that order
func HealthcheckHandler ¶ added in v0.2.15
func HealthcheckHandler(w http.ResponseWriter, r *http.Request)
HealthcheckHandler /healthcheck just returns 200 '{ "ok": true }'
func LoginHandler ¶
func LoginHandler(w http.ResponseWriter, r *http.Request)
LoginHandler /login currently performs a 302 redirect to Google
func LogoutHandler ¶ added in v0.2.1
func LogoutHandler(w http.ResponseWriter, r *http.Request)
LogoutHandler /logout currently performs a 302 redirect to Google
func ValidateRequestHandler ¶
func ValidateRequestHandler(w http.ResponseWriter, r *http.Request)
ValidateRequestHandler /validate TODO this should use the handler interface
func VerifyUser ¶
VerifyUser validates that the domains match for the user
Types ¶
Click to show internal directories.
Click to hide internal directories.