whgoth

package module
Version: v1.0.0-...-2a53486 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

README

whgoth

Webhelp extensions for Mark Bates' Goth library.

See http://github.com/go-webhelp/webhelp for more on webhelp projects.

Docs

https://godoc.org/gopkg.in/go-webhelp/whgoth.v1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthProvider

type AuthProvider struct {
	goth.Provider
	// contains filtered or unexported fields
}

func (*AuthProvider) LoginURL

func (a *AuthProvider) LoginURL(redirectTo string) string

func (*AuthProvider) Logout

func (a *AuthProvider) Logout(ctx context.Context, w http.ResponseWriter) (
	err error)

func (*AuthProvider) User

func (a *AuthProvider) User(ctx context.Context) (*goth.User, error)

type AuthProviders

type AuthProviders struct {
	whmux.Dir
	// contains filtered or unexported fields
}

func NewAuthProviders

func NewAuthProviders(baseURL, sessionNamespace string,
	providers ...goth.Provider) (a *AuthProviders)

func NewLazyAuthProviders

func NewLazyAuthProviders(baseURL, sessionNamespace string,
	providers func(context.Context) ([]goth.Provider, error)) (
	a *AuthProviders)

func (*AuthProviders) Logout

func (a *AuthProviders) Logout(ctx context.Context, w http.ResponseWriter) (
	err error)

func (*AuthProviders) LogoutURL

func (a *AuthProviders) LogoutURL(redirectTo string) string

func (*AuthProviders) Providers

func (a *AuthProviders) Providers(ctx context.Context) (
	[]*AuthProvider, error)

func (*AuthProviders) RequireUser

func (a *AuthProviders) RequireUser(
	authorizedHandler, unauthorizedHandler http.Handler) http.Handler

func (*AuthProviders) User

func (a *AuthProviders) User(ctx context.Context) (*goth.User, error)

Jump to

Keyboard shortcuts

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