handler

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPSessionStore

type HTTPSessionStore struct {
	// contains filtered or unexported fields
}

func NewHTTPSessionStore

func NewHTTPSessionStore() (*HTTPSessionStore, error)

func (*HTTPSessionStore) CreateNonce

func (store *HTTPSessionStore) CreateNonce(w http.ResponseWriter, r *http.Request) (string, error)

func (*HTTPSessionStore) GetAndRemove

func (store *HTTPSessionStore) GetAndRemove(r *http.Request) (string, error)

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func New

func New(config *config.Config, core core.CoreAuth, nonceStore NonceStore) (*Handler, error)

func (*Handler) CallbackHandler

func (handler *Handler) CallbackHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) HomeHandler

func (handler *Handler) HomeHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) LoginHandler

func (handler *Handler) LoginHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) PingHandler

func (handler *Handler) PingHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) ProviderLoginHandler

func (handler *Handler) ProviderLoginHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) PublicKeyHandler

func (handler *Handler) PublicKeyHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) RobotsHandler

func (handler *Handler) RobotsHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) VerifyToken

func (handler *Handler) VerifyToken(w http.ResponseWriter, r *http.Request)

type NonceStore

type NonceStore interface {
	CreateNonce(w http.ResponseWriter, r *http.Request) (string, error)
	GetAndRemove(r *http.Request) (string, error)
}

NonceStore simply stores a nonce for CSRF attack prevention

type PublicKey

type PublicKey struct {
	Keys []string
}

PublicKey is a struct for a list of keys

Jump to

Keyboard shortcuts

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