registry

package
v0.0.0-...-9637607 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallRegistry

func CallRegistry(ctx context.Context, r Registry)

Types

type Driver

type Driver interface {
	// CanHandle returns true if the driver is capable of handling the given DSN or false otherwise.
	CanHandle(dsn string) bool

	// Ping returns nil if the driver has connectivity and is healthy or an error otherwise.
	Ping() error
}

type Registry

type Registry interface {
	Driver

	Init(ctx context.Context) error

	WithConfig(c *config.Provider) Registry
	WithLogger(l *logrusx.Logger) Registry

	Config() *config.Provider
	persistence.Provider
	helpers.RegistryLogger
	helpers.RegistryWriter
	helpers.RegistryCookieStore
	client.Registry
	consent.Registry
	jwk.Registry
	oauth2.Registry
	PrometheusManager() *prometheus.MetricsManager
	helpers.TracingProvider

	RegisterRoutes(admin *helpers.RouterAdmin, public *helpers.RouterPublic)
	ClientHandler() *client.Handler
	KeyHandler() *jwk.Handler
	ConsentHandler() *consent.Handler
	OAuth2Handler() *oauth2.Handler
	HealthHandler() *healthx.Handler

	OAuth2HMACStrategy() *foauth2.HMACSHAStrategy
	WithOAuth2Provider(f fosite.OAuth2Provider)
	WithConsentStrategy(c consent.Strategy)
}

func NewRegistryFromDSN

func NewRegistryFromDSN(ctx context.Context, c *config.Provider, l *logrusx.Logger) (Registry, error)

type RegistryBase

type RegistryBase struct {
	C *config.Provider
	// contains filtered or unexported fields
}

func (*RegistryBase) AccessTokenJWTStrategy

func (m *RegistryBase) AccessTokenJWTStrategy() jwk.JWTStrategy

func (*RegistryBase) AudienceStrategy

func (m *RegistryBase) AudienceStrategy() fosite.AudienceMatchingStrategy

func (*RegistryBase) AuditLogger

func (m *RegistryBase) AuditLogger() *logrusx.Logger

func (*RegistryBase) BuildDate

func (m *RegistryBase) BuildDate() string

func (*RegistryBase) BuildHash

func (m *RegistryBase) BuildHash() string

func (*RegistryBase) BuildVersion

func (m *RegistryBase) BuildVersion() string

func (*RegistryBase) ClientHandler

func (m *RegistryBase) ClientHandler() *client.Handler

func (*RegistryBase) ClientHasher

func (m *RegistryBase) ClientHasher() fosite.Hasher

func (*RegistryBase) ClientValidator

func (m *RegistryBase) ClientValidator() *client.Validator

func (*RegistryBase) Config

func (m *RegistryBase) Config() *config.Provider

func (*RegistryBase) ConsentHandler

func (m *RegistryBase) ConsentHandler() *consent.Handler

func (*RegistryBase) ConsentStrategy

func (m *RegistryBase) ConsentStrategy() consent.Strategy

func (*RegistryBase) CookieStore

func (m *RegistryBase) CookieStore() sessions.Store

func (*RegistryBase) FositeOpenIDDefaultStrategy

func (m *RegistryBase) FositeOpenIDDefaultStrategy() *openid.DefaultStrategy

func (*RegistryBase) HealthHandler

func (m *RegistryBase) HealthHandler() *healthx.Handler

func (*RegistryBase) KeyCipher

func (m *RegistryBase) KeyCipher() *jwk.AEAD

func (*RegistryBase) KeyGenerators

func (m *RegistryBase) KeyGenerators() map[string]jwk.KeyGenerator

func (*RegistryBase) KeyHandler

func (m *RegistryBase) KeyHandler() *jwk.Handler

func (*RegistryBase) Logger

func (m *RegistryBase) Logger() *logrusx.Logger

func (*RegistryBase) OAuth2AwareMiddleware

func (m *RegistryBase) OAuth2AwareMiddleware() func(h http.Handler) http.Handler

func (*RegistryBase) OAuth2HMACStrategy

func (m *RegistryBase) OAuth2HMACStrategy() *foauth2.HMACSHAStrategy

func (*RegistryBase) OAuth2Handler

func (m *RegistryBase) OAuth2Handler() *oauth2.Handler

func (*RegistryBase) OAuth2Provider

func (m *RegistryBase) OAuth2Provider() fosite.OAuth2Provider

func (*RegistryBase) OpenIDConnectRequestValidator

func (m *RegistryBase) OpenIDConnectRequestValidator() *openid.OpenIDConnectRequestValidator

func (*RegistryBase) OpenIDJWTStrategy

func (m *RegistryBase) OpenIDJWTStrategy() jwk.JWTStrategy

func (*RegistryBase) Persister

func (m *RegistryBase) Persister() persistence.Persister

func (*RegistryBase) PrometheusManager

func (m *RegistryBase) PrometheusManager() *prometheus.MetricsManager

func (*RegistryBase) RegisterRoutes

func (m *RegistryBase) RegisterRoutes(admin *helpers.RouterAdmin, public *helpers.RouterPublic)

func (*RegistryBase) ScopeStrategy

func (m *RegistryBase) ScopeStrategy() fosite.ScopeStrategy

func (*RegistryBase) SubjectIdentifierAlgorithm

func (m *RegistryBase) SubjectIdentifierAlgorithm() map[string]consent.SubjectIdentifierAlgorithm

func (*RegistryBase) Tracer

func (m *RegistryBase) Tracer(ctx context.Context) *tracing.Tracer

func (*RegistryBase) WithBuildInfo

func (m *RegistryBase) WithBuildInfo(version, hash, date string) Registry

func (*RegistryBase) WithConfig

func (m *RegistryBase) WithConfig(c *config.Provider) Registry

func (*RegistryBase) WithConsentStrategy

func (m *RegistryBase) WithConsentStrategy(c consent.Strategy)

WithConsentStrategy forces a consent strategy which is only used for testing.

func (*RegistryBase) WithLogger

func (m *RegistryBase) WithLogger(l *logrusx.Logger) Registry

func (*RegistryBase) WithOAuth2Provider

func (m *RegistryBase) WithOAuth2Provider(f fosite.OAuth2Provider)

WithOAuth2Provider forces an oauth2 provider which is only used for testing.

func (*RegistryBase) Writer

func (m *RegistryBase) Writer() herodot.Writer

type RegistrySQL

type RegistrySQL struct {
	*RegistryBase
	// contains filtered or unexported fields
}

func NewRegistrySQL

func NewRegistrySQL() *RegistrySQL

func (*RegistrySQL) CanHandle

func (m *RegistrySQL) CanHandle(dsn string) bool

func (*RegistrySQL) ClientManager

func (m *RegistrySQL) ClientManager() client.Manager

func (*RegistrySQL) ConsentManager

func (m *RegistrySQL) ConsentManager() consent.Manager

func (*RegistrySQL) Init

func (m *RegistrySQL) Init(ctx context.Context) error

func (*RegistrySQL) KeyManager

func (m *RegistrySQL) KeyManager() jwk.Manager

func (*RegistrySQL) OAuth2Storage

func (m *RegistrySQL) OAuth2Storage() helpers.FositeStorer

func (*RegistrySQL) Ping

func (m *RegistrySQL) Ping() error

Jump to

Keyboard shortcuts

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