config

package
Version: v0.11.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// These are used by client commands
	EndpointURL string `mapstructure:"HYDRA_URL" yaml:"-"`

	// These are used by the host command
	BindPort                         int    `mapstructure:"PORT" yaml:"-"`
	BindHost                         string `mapstructure:"HOST" yaml:"-"`
	Issuer                           string `mapstructure:"OAUTH2_ISSUER_URL" yaml:"-"`
	SystemSecret                     string `mapstructure:"SYSTEM_SECRET" yaml:"-"`
	DatabaseURL                      string `mapstructure:"DATABASE_URL" yaml:"-"`
	DatabasePlugin                   string `mapstructure:"DATABASE_PLUGIN" yaml:"-"`
	ConsentURL                       string `mapstructure:"OAUTH2_CONSENT_URL" yaml:"-"`
	LoginURL                         string `mapstructure:"OAUTH2_LOGIN_URL" yaml:"-"`
	ErrorURL                         string `mapstructure:"OAUTH2_ERROR_URL" yaml:"-"`
	AllowTLSTermination              string `mapstructure:"HTTPS_ALLOW_TERMINATION_FROM" yaml:"-"`
	BCryptWorkFactor                 int    `mapstructure:"BCRYPT_COST" yaml:"-"`
	AccessTokenLifespan              string `mapstructure:"ACCESS_TOKEN_LIFESPAN" yaml:"-"`
	ScopeStrategy                    string `mapstructure:"SCOPE_STRATEGY" yaml:"-"`
	AuthCodeLifespan                 string `mapstructure:"AUTH_CODE_LIFESPAN" yaml:"-"`
	IDTokenLifespan                  string `mapstructure:"ID_TOKEN_LIFESPAN" yaml:"-"`
	ChallengeTokenLifespan           string `mapstructure:"CHALLENGE_TOKEN_LIFESPAN" yaml:"-"`
	CookieSecret                     string `mapstructure:"COOKIE_SECRET" yaml:"-"`
	LogLevel                         string `mapstructure:"LOG_LEVEL" yaml:"-"`
	LogFormat                        string `mapstructure:"LOG_FORMAT" yaml:"-"`
	AccessControlResourcePrefix      string `mapstructure:"RESOURCE_NAME_PREFIX" yaml:"-"`
	OpenIDDiscoveryClaimsSupported   string `mapstructure:"OIDC_DISCOVERY_CLAIMS_SUPPORTED" yaml:"-"`
	OpenIDDiscoveryScopesSupported   string `mapstructure:"OIDC_DISCOVERY_SCOPES_SUPPORTED" yaml:"-"`
	OpenIDDiscoveryUserinfoEndpoint  string `mapstructure:"OIDC_DISCOVERY_USERINFO_ENDPOINT" yaml:"-"`
	SendOAuth2DebugMessagesToClients bool   `mapstructure:"OAUTH2_SHARE_ERROR_DEBUG" yaml:"-"`
	ForceHTTP                        bool   `yaml:"-"`

	BuildVersion string `yaml:"-"`
	BuildHash    string `yaml:"-"`
	BuildTime    string `yaml:"-"`
	// contains filtered or unexported fields
}

func (*Config) Context

func (c *Config) Context() *Context

func (*Config) DoesRequestSatisfyTermination

func (c *Config) DoesRequestSatisfyTermination(r *http.Request) error

func (*Config) GetAccessTokenLifespan

func (c *Config) GetAccessTokenLifespan() time.Duration

func (*Config) GetAddress

func (c *Config) GetAddress() string

func (*Config) GetAuthCodeLifespan

func (c *Config) GetAuthCodeLifespan() time.Duration

func (*Config) GetChallengeTokenLifespan

func (c *Config) GetChallengeTokenLifespan() time.Duration

func (*Config) GetClusterURLWithoutTailingSlash added in v0.11.1

func (c *Config) GetClusterURLWithoutTailingSlash(cmd *cobra.Command) string

func (*Config) GetCookieSecret added in v0.7.0

func (c *Config) GetCookieSecret() []byte

func (*Config) GetIDTokenLifespan

func (c *Config) GetIDTokenLifespan() time.Duration

func (*Config) GetLogger added in v0.8.0

func (c *Config) GetLogger() *logrus.Logger

func (*Config) GetPrometheusMetrics added in v0.11.13

func (c *Config) GetPrometheusMetrics() *prometheus.MetricsManager

func (*Config) GetScopeStrategy added in v0.9.14

func (c *Config) GetScopeStrategy() fosite.ScopeStrategy

func (*Config) GetSystemSecret

func (c *Config) GetSystemSecret() []byte

func (*Config) Persist

func (c *Config) Persist() error

func (*Config) Resolve

func (c *Config) Resolve(join ...string) *url.URL

type Context

type Context struct {
	Connection interface{}

	Hasher         fosite.Hasher
	FositeStrategy oauth2.CoreStrategy
	FositeStore    pkg.FositeStorer
	KeyManager     jwk.Manager
	ConsentManager consent.Manager
}

type MemoryConnection

type MemoryConnection struct{}

type PluginConnection added in v0.9.6

type PluginConnection struct {
	Config *Config

	Logger logrus.FieldLogger
	// contains filtered or unexported fields
}

func (*PluginConnection) Connect added in v0.9.6

func (c *PluginConnection) Connect() error

func (*PluginConnection) NewClientManager added in v0.9.6

func (c *PluginConnection) NewClientManager() (client.Manager, error)

func (*PluginConnection) NewConsentManager added in v0.11.13

func (c *PluginConnection) NewConsentManager() (consent.Manager, error)

func (*PluginConnection) NewJWKManager added in v0.9.6

func (c *PluginConnection) NewJWKManager() (jwk.Manager, error)

func (*PluginConnection) NewOAuth2Manager added in v0.9.6

func (c *PluginConnection) NewOAuth2Manager(clientManager client.Manager) (pkg.FositeStorer, error)

func (*PluginConnection) Ping added in v0.11.13

func (c *PluginConnection) Ping() error

Jump to

Keyboard shortcuts

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