auth

package
v0.0.0-...-c52fe67 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	// OAuth2 config
	OAuth2Config *oauth2.Config

	// OpenID provider
	OpenIDProvider *oidc.Provider

	// OpenID token verifier
	OpenIDVerifier *oidc.IDTokenVerifier

	// Optional if provider doesn't support it in openid-configuration
	LogoutRedirect string
	LogoutCallback string

	// Cookies rules
	Cookie Cookie

	AutoSignIn         bool
	Secret             []byte
	SuccessRedirectURL string
}

func New

func New(ctx context.Context, cfg auth.Config) (*Auth, error)
type Cookie struct {
	SessionName string `default:"ssid"`
	StateName   string `default:"state"`
	Domain      string
	Secure      bool
}

Jump to

Keyboard shortcuts

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