handlers

package
v0.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2020 License: MIT Imports: 27 Imported by: 1

Documentation

Index

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) - issue jwt in the form of a cookie

func Configure added in v0.9.0

func Configure()

Configure see main.go configure()

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 302 redirect to the provider

func ValidateRequestHandler

func ValidateRequestHandler(w http.ResponseWriter, r *http.Request)

ValidateRequestHandler /validate TODO this should use the handler interface

Types

type Index

type Index struct {
	Msg      string
	TestURLs []string
	Testing  bool
}

Index variables passed to index.tmpl

type Provider added in v0.9.0

type Provider interface {
	Configure()
	GetUserInfo(r *http.Request, user *structs.User, customClaims *structs.CustomClaims, ptokens *structs.PTokens) error
}

Provider each Provider must support GetuserInfo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL