Back to godoc.org
gopkg.in/go-webhelp/whgoth.v1

package whgoth

v1.0.0 (2a53486)
Latest Go to latest
Published: Jun 14, 2019 | License: Apache-2.0 | Module: gopkg.in/go-webhelp/whgoth.v1

Index

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)
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier