config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOAuth2Config

func NewOAuth2Config() (conf *oauth2.Config)

func NewSessionCookieOption

func NewSessionCookieOption() sessions.Options

Types

type AuthConfig

type AuthConfig struct {
	CSRFCookieOptions *CSRFCookieOption
	GoogleOAuthConfig *oauth2.Config
	WhitelistUsers    utils.WhitelistInfo
}

type CSRFCookieOption

type CSRFCookieOption struct {
	Path     string
	Domain   string
	MaxAge   int
	Secure   bool
	HttpOnly bool
	SameSite http.SameSite
}

func NewCSRFCookieOption

func NewCSRFCookieOption() *CSRFCookieOption

type Config

type Config struct {
	CSRFCookieOptions *CSRFCookieOption
	GoogleOAuthConfig *oauth2.Config
	WhitelistUsers    utils.WhitelistInfo
}

func (*Config) ToAuthConfig

func (c *Config) ToAuthConfig() *AuthConfig

func (*Config) ToMiddlewareConfig

func (c *Config) ToMiddlewareConfig() *MiddlewareConfig

func (*Config) ToV1Config

func (c *Config) ToV1Config() *V1Config

type IConfig

type IConfig interface {
	ToAuthConfig() *AuthConfig
	ToMiddlewareConfig() *MiddlewareConfig
	ToV1Config() *V1Config
}

type MiddlewareConfig

type MiddlewareConfig struct {
	WhitelistUsers utils.WhitelistInfo
}

type V1Config

type V1Config struct {
	WhitelistUsers utils.WhitelistInfo
}

Jump to

Keyboard shortcuts

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