configuration

package
v0.19.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: Apache-2.0 Imports: 19 Imported by: 11

Documentation

Index

Constants

View Source
const (
	ViperKeyProxyReadTimeout       = "serve.proxy.timeout.read"
	ViperKeyProxyWriteTimeout      = "serve.proxy.timeout.write"
	ViperKeyProxyIdleTimeout       = "serve.proxy.timeout.idle"
	ViperKeyProxyServeAddressHost  = "serve.proxy.host"
	ViperKeyProxyServeAddressPort  = "serve.proxy.port"
	ViperKeyAPIServeAddressHost    = "serve.api.host"
	ViperKeyAPIServeAddressPort    = "serve.api.port"
	ViperKeyAccessRuleRepositories = "access_rules.repositories"
)
View Source
const (
	ViperKeyAuthorizerAllowIsEnabled = "authorizers.allow.enabled"

	ViperKeyAuthorizerDenyIsEnabled = "authorizers.deny.enabled"

	ViperKeyAuthorizerKetoEngineACPORYIsEnabled = "authorizers.keto_engine_acp_ory.enabled"
)

Authorizers

View Source
const (
	ViperKeyMutatorCookieIsEnabled = "mutators.cookie.enabled"

	ViperKeyMutatorHeaderIsEnabled = "mutators.header.enabled"

	ViperKeyMutatorNoopIsEnabled = "mutators.noop.enabled"

	ViperKeyMutatorHydratorIsEnabled = "mutators.hydrator.enabled"

	ViperKeyMutatorIDTokenIsEnabled = "mutators.id_token.enabled"
	ViperKeyMutatorIDTokenJWKSURL   = "mutators.id_token.config.jwks_url"
)

Mutators

View Source
const (
	// anonymous
	ViperKeyAuthenticatorAnonymousIsEnabled = "authenticators.anonymous.enabled"

	// noop
	ViperKeyAuthenticatorNoopIsEnabled = "authenticators.noop.enabled"

	// cookie session
	ViperKeyAuthenticatorCookieSessionIsEnabled = "authenticators.cookie_session.enabled"

	// jwt
	ViperKeyAuthenticatorJWTIsEnabled = "authenticators.jwt.enabled"

	// oauth2_client_credentials
	ViperKeyAuthenticatorOAuth2ClientCredentialsIsEnabled = "authenticators.oauth2_client_credentials.enabled"

	// oauth2_token_introspection
	ViperKeyAuthenticatorOAuth2TokenIntrospectionIsEnabled = "authenticators.oauth2_introspection.enabled"

	// unauthorized
	ViperKeyAuthenticatorUnauthorizedIsEnabled = "authenticators.unauthorized.enabled"
)

Authenticators

Variables

This section is empty.

Functions

func BindEnvs

func BindEnvs()

func MustValidate

func MustValidate(l logrus.FieldLogger, p Provider)

Types

type Provider

type Provider interface {
	CORSEnabled(iface string) bool
	CORSOptions(iface string) cors.Options

	ProviderAuthenticators
	ProviderAuthorizers
	ProviderMutators

	ProxyReadTimeout() time.Duration
	ProxyWriteTimeout() time.Duration
	ProxyIdleTimeout() time.Duration

	AccessRuleRepositories() []url.URL

	ProxyServeAddress() string
	APIServeAddress() string

	ToScopeStrategy(value string, key string) fosite.ScopeStrategy
	ParseURLs(sources []string) ([]url.URL, error)
	JSONWebKeyURLs() []string
}

type ProviderAuthenticators

type ProviderAuthenticators interface {
	AuthenticatorConfig(id string, overrides json.RawMessage, destination interface{}) error
	AuthenticatorIsEnabled(id string) bool
}

type ProviderAuthorizers

type ProviderAuthorizers interface {
	AuthorizerConfig(id string, overrides json.RawMessage, destination interface{}) error
	AuthorizerIsEnabled(id string) bool
}

type ProviderMutators

type ProviderMutators interface {
	MutatorConfig(id string, overrides json.RawMessage, destination interface{}) error
	MutatorIsEnabled(id string) bool
}

type ViperProvider

type ViperProvider struct {
	// contains filtered or unexported fields
}

func NewViperProvider

func NewViperProvider(l logrus.FieldLogger) *ViperProvider

func (*ViperProvider) APIServeAddress

func (v *ViperProvider) APIServeAddress() string

func (*ViperProvider) AccessRuleRepositories

func (v *ViperProvider) AccessRuleRepositories() []url.URL

func (*ViperProvider) AuthenticatorConfig

func (v *ViperProvider) AuthenticatorConfig(id string, override json.RawMessage, dest interface{}) error

func (*ViperProvider) AuthenticatorIsEnabled

func (v *ViperProvider) AuthenticatorIsEnabled(id string) bool

func (*ViperProvider) AuthorizerConfig

func (v *ViperProvider) AuthorizerConfig(id string, override json.RawMessage, dest interface{}) error

func (*ViperProvider) AuthorizerIsEnabled

func (v *ViperProvider) AuthorizerIsEnabled(id string) bool

func (*ViperProvider) CORSEnabled

func (v *ViperProvider) CORSEnabled(iface string) bool

func (*ViperProvider) CORSOptions

func (v *ViperProvider) CORSOptions(iface string) cors.Options

func (*ViperProvider) JSONWebKeyURLs

func (v *ViperProvider) JSONWebKeyURLs() []string

func (*ViperProvider) MutatorConfig

func (v *ViperProvider) MutatorConfig(id string, override json.RawMessage, dest interface{}) error

func (*ViperProvider) MutatorIsEnabled

func (v *ViperProvider) MutatorIsEnabled(id string) bool

func (*ViperProvider) ParseURLs

func (v *ViperProvider) ParseURLs(sources []string) ([]url.URL, error)

func (*ViperProvider) PipelineConfig

func (v *ViperProvider) PipelineConfig(prefix, id string, override json.RawMessage, dest interface{}) error

func (*ViperProvider) ProxyIdleTimeout

func (v *ViperProvider) ProxyIdleTimeout() time.Duration

func (*ViperProvider) ProxyReadTimeout

func (v *ViperProvider) ProxyReadTimeout() time.Duration

func (*ViperProvider) ProxyServeAddress

func (v *ViperProvider) ProxyServeAddress() string

func (*ViperProvider) ProxyWriteTimeout

func (v *ViperProvider) ProxyWriteTimeout() time.Duration

func (*ViperProvider) ToScopeStrategy

func (v *ViperProvider) ToScopeStrategy(value string, key string) fosite.ScopeStrategy

Jump to

Keyboard shortcuts

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