Documentation ¶
Index ¶
- Constants
- type MatchingStrategy
- type Provider
- type ProviderAuthenticators
- type ProviderAuthorizers
- type ProviderErrorHandlers
- type ProviderMutators
- type ViperProvider
- func (v *ViperProvider) APIIdleTimeout() time.Duration
- func (v *ViperProvider) APIReadTimeout() time.Duration
- func (v *ViperProvider) APIServeAddress() string
- func (v *ViperProvider) APIWriteTimeout() time.Duration
- func (v *ViperProvider) AccessRuleMatchingStrategy() MatchingStrategy
- func (v *ViperProvider) AccessRuleRepositories() []url.URL
- func (v *ViperProvider) AuthenticatorConfig(id string, override json.RawMessage, dest interface{}) error
- func (v *ViperProvider) AuthenticatorIsEnabled(id string) bool
- func (v *ViperProvider) AuthenticatorJwtJwkMaxWait() time.Duration
- func (v *ViperProvider) AuthenticatorJwtJwkTtl() time.Duration
- func (v *ViperProvider) AuthorizerConfig(id string, override json.RawMessage, dest interface{}) error
- func (v *ViperProvider) AuthorizerIsEnabled(id string) bool
- func (v *ViperProvider) CORSEnabled(iface string) bool
- func (v *ViperProvider) CORSOptions(iface string) cors.Options
- func (v *ViperProvider) ErrorHandlerConfig(id string, override json.RawMessage, dest interface{}) error
- func (v *ViperProvider) ErrorHandlerFallbackSpecificity() []string
- func (v *ViperProvider) ErrorHandlerIsEnabled(id string) bool
- func (v *ViperProvider) JSONWebKeyURLs() []string
- func (v *ViperProvider) MutatorConfig(id string, override json.RawMessage, dest interface{}) error
- func (v *ViperProvider) MutatorIsEnabled(id string) bool
- func (v *ViperProvider) ParseURLs(sources []string) ([]url.URL, error)
- func (v *ViperProvider) PipelineConfig(prefix, id string, override json.RawMessage, dest interface{}) error
- func (v *ViperProvider) PrometheusCollapseRequestPaths() bool
- func (v *ViperProvider) PrometheusMetricsNamePrefix() string
- func (v *ViperProvider) PrometheusMetricsPath() string
- func (v *ViperProvider) PrometheusServeAddress() string
- func (v *ViperProvider) ProxyIdleTimeout() time.Duration
- func (v *ViperProvider) ProxyReadTimeout() time.Duration
- func (v *ViperProvider) ProxyServeAddress() string
- func (v *ViperProvider) ProxyWriteTimeout() time.Duration
- func (v *ViperProvider) ToScopeStrategy(value string, key string) fosite.ScopeStrategy
- func (v *ViperProvider) TracingJaegerConfig() *tracing.JaegerConfig
- func (v *ViperProvider) TracingProvider() string
- func (v *ViperProvider) TracingServiceName() string
- func (v *ViperProvider) TracingZipkinConfig() *tracing.ZipkinConfig
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" ViperKeyAPIReadTimeout = "serve.api.timeout.read" ViperKeyAPIWriteTimeout = "serve.api.timeout.write" ViperKeyAPIIdleTimeout = "serve.api.timeout.idle" ViperKeyPrometheusServeAddressHost = "serve.prometheus.host" ViperKeyPrometheusServeAddressPort = "serve.prometheus.port" ViperKeyPrometheusServeMetricsPath = "serve.prometheus.metrics_path" ViperKeyPrometheusServeMetricsNamePrefix = "serve.prometheus.metric_name_prefix" ViperKeyPrometheusServeCollapseRequestPaths = "serve.prometheus.collapse_request_paths" ViperKeyAccessRuleRepositories = "access_rules.repositories" ViperKeyAccessRuleMatchingStrategy = "access_rules.matching_strategy" )
View Source
const ( ViperKeyAuthorizerAllowIsEnabled = "authorizers.allow.enabled" ViperKeyAuthorizerDenyIsEnabled = "authorizers.deny.enabled" ViperKeyAuthorizerKetoEngineACPORYIsEnabled = "authorizers.keto_engine_acp_ory.enabled" ViperKeyAuthorizerRemoteIsEnabled = "authorizers.remote.enabled" ViperKeyAuthorizerRemoteJSONIsEnabled = "authorizers.remote_json.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" ViperKeyAuthenticatorJwtJwkMaxWait = "authenticators.jwt.config.jwks_max_wait" ViperKeyAuthenticatorJwtJwkTtl = "authenticators.jwt.config.jwks_ttl" // oauth2_client_credentials ViperKeyAuthenticatorOAuth2ClientCredentialsIsEnabled = "authenticators.oauth2_client_credentials.enabled" // oauth2_token_introspection ViperKeyAuthenticatorOAuth2TokenIntrospectionIsEnabled = "authenticators.oauth2_introspection.enabled" ViperKeyAuthenticatorUnauthorizedIsEnabled = "authenticators.unauthorized.enabled" )
Authenticators
View Source
const ( ViperKeyErrors = "errors.handlers" ViperKeyErrorsFallback = "errors.fallback" ViperKeyErrorsJSONIsEnabled = ViperKeyErrors + ".json.enabled" ViperKeyErrorsRedirectIsEnabled = ViperKeyErrors + ".redirect.enabled" ViperKeyErrorsWWWAuthenticateIsEnabled = ViperKeyErrors + ".www_authenticate.enabled" )
Errors
View Source
const (
ForbiddenStrategyErrorType = "forbidden"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MatchingStrategy ¶
type MatchingStrategy string
MatchingStrategy defines matching strategy such as Regexp or Glob. Empty string defaults to "regexp".
const ( Regexp MatchingStrategy = "regexp" Glob MatchingStrategy = "glob" )
Possible matching strategies.
type Provider ¶
type Provider interface { CORSEnabled(iface string) bool CORSOptions(iface string) cors.Options ProviderAuthenticators ProviderErrorHandlers ProviderAuthorizers ProviderMutators ProxyReadTimeout() time.Duration ProxyWriteTimeout() time.Duration ProxyIdleTimeout() time.Duration APIReadTimeout() time.Duration APIWriteTimeout() time.Duration APIIdleTimeout() time.Duration AccessRuleRepositories() []url.URL AccessRuleMatchingStrategy() MatchingStrategy ProxyServeAddress() string APIServeAddress() string PrometheusServeAddress() string PrometheusMetricsPath() string PrometheusMetricsNamePrefix() string PrometheusCollapseRequestPaths() bool ToScopeStrategy(value string, key string) fosite.ScopeStrategy ParseURLs(sources []string) ([]url.URL, error) JSONWebKeyURLs() []string TracingServiceName() string TracingProvider() string TracingJaegerConfig() *tracing.JaegerConfig TracingZipkinConfig() *tracing.ZipkinConfig }
type ProviderAuthenticators ¶
type ProviderAuthorizers ¶
type ProviderErrorHandlers ¶
type ProviderMutators ¶
type ViperProvider ¶
type ViperProvider struct {
// contains filtered or unexported fields
}
func NewViperProvider ¶
func NewViperProvider(l *logrusx.Logger) *ViperProvider
func (*ViperProvider) APIIdleTimeout ¶
func (v *ViperProvider) APIIdleTimeout() time.Duration
func (*ViperProvider) APIReadTimeout ¶
func (v *ViperProvider) APIReadTimeout() time.Duration
func (*ViperProvider) APIServeAddress ¶
func (v *ViperProvider) APIServeAddress() string
func (*ViperProvider) APIWriteTimeout ¶
func (v *ViperProvider) APIWriteTimeout() time.Duration
func (*ViperProvider) AccessRuleMatchingStrategy ¶
func (v *ViperProvider) AccessRuleMatchingStrategy() MatchingStrategy
AccessRuleMatchingStrategy returns current MatchingStrategy.
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) AuthenticatorJwtJwkMaxWait ¶
func (v *ViperProvider) AuthenticatorJwtJwkMaxWait() time.Duration
func (*ViperProvider) AuthenticatorJwtJwkTtl ¶
func (v *ViperProvider) AuthenticatorJwtJwkTtl() time.Duration
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) ErrorHandlerConfig ¶
func (v *ViperProvider) ErrorHandlerConfig(id string, override json.RawMessage, dest interface{}) error
func (*ViperProvider) ErrorHandlerFallbackSpecificity ¶
func (v *ViperProvider) ErrorHandlerFallbackSpecificity() []string
func (*ViperProvider) ErrorHandlerIsEnabled ¶
func (v *ViperProvider) ErrorHandlerIsEnabled(id string) bool
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) PrometheusCollapseRequestPaths ¶
func (v *ViperProvider) PrometheusCollapseRequestPaths() bool
func (*ViperProvider) PrometheusMetricsNamePrefix ¶ added in v0.39.1
func (v *ViperProvider) PrometheusMetricsNamePrefix() string
func (*ViperProvider) PrometheusMetricsPath ¶
func (v *ViperProvider) PrometheusMetricsPath() string
func (*ViperProvider) PrometheusServeAddress ¶
func (v *ViperProvider) PrometheusServeAddress() string
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
func (*ViperProvider) TracingJaegerConfig ¶
func (v *ViperProvider) TracingJaegerConfig() *tracing.JaegerConfig
func (*ViperProvider) TracingProvider ¶
func (v *ViperProvider) TracingProvider() string
func (*ViperProvider) TracingServiceName ¶
func (v *ViperProvider) TracingServiceName() string
func (*ViperProvider) TracingZipkinConfig ¶
func (v *ViperProvider) TracingZipkinConfig() *tracing.ZipkinConfig
Click to show internal directories.
Click to hide internal directories.