oauth

package
v0.0.0-...-5d38250 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2018 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package oauth provides an HTTP handler to handle OAuth2 redirect and callback requests for the bebop web app.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 Handler

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

Handler handles oauth2 authentication requests.

func New

func New(config *Config) *Handler

New creates a new handler based on the given config.

func (*Handler) AddProvider

func (h *Handler) AddProvider(name, id, secret string) error

AddProvider adds a new provider to oauth handler.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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