config

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxGroups = 100
)
View Source
const (
	TransactionTimeout = time.Minute
)

Variables

This section is empty.

Functions

func GetEmailDomain

func GetEmailDomain(email string) string

Types

type Config

type Config struct {
	Provider ProviderConfig `yaml:"provider" json:"provider"`
	Proxy    ProxyConfig    `yaml:"proxy" json:"proxy"`
	Server   ServerConfig   `yaml:"server" json:"server"`
}

func Load

func Load() (*Config, error)

func (*Config) ValidateAndInitialize

func (c *Config) ValidateAndInitialize() error

type HostConfig

type HostConfig struct {
	Host     string `yaml:"host" json:"host"`
	Endpoint string `yaml:"endpoint" json:"endpoint"`
	// contains filtered or unexported fields
}

type ProviderConfig

type ProviderConfig struct {
	Name                string   `yaml:"name" json:"name"`
	ClientID            string   `yaml:"clientID" json:"clientID"`
	ClientSecret        string   `yaml:"clientSecret" json:"clientSecret"`
	Organization        string   `yaml:"organization" json:"organization"`
	AllowedEmailDomains []string `yaml:"allowedEmailDomains" json:"allowedEmailDomains"`
	// contains filtered or unexported fields
}

func (*ProviderConfig) ValidateEmailDomain

func (p *ProviderConfig) ValidateEmailDomain(email string) bool

type ProxyConfig

type ProxyConfig struct {
	Hosts                []*HostConfig `yaml:"hosts" json:"hosts"`
	DisableConsentScreen bool          `yaml:"disableConsentScreen" json:"disableConsentScreen"`
	AllowedRedirectURLs  []string      `yaml:"allowedRedirectURLs" json:"allowedRedirectURLs"`
	CORS                 bool          `yaml:"cors" json:"cors"`
	// contains filtered or unexported fields
}

func (*ProxyConfig) AcceptsHost

func (p *ProxyConfig) AcceptsHost(host string) bool

func (*ProxyConfig) SupportedScopes

func (p *ProxyConfig) SupportedScopes(ctx context.Context, host string) ([]string, []ScopeConfig, error)

func (*ProxyConfig) ValidateRedirectURL

func (p *ProxyConfig) ValidateRedirectURL(url string) bool

type ScopeConfig

type ScopeConfig struct {
	Name        string   `yaml:"name" json:"name"`
	Description string   `yaml:"description" json:"description"`
	Tools       []string `yaml:"tools" json:"tools"`
}

type ServerConfig

type ServerConfig struct {
	Addr string `yaml:"addr" json:"addr"`
}

Jump to

Keyboard shortcuts

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