oidc

package
v0.1.322 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReflectTypeGetOIDCAuthenticatorConfig = reflect.TypeOf(GetOIDCAuthenticatorConfig(nil))

ReflectTypeGetOIDCAuthenticatorConfig used when your service claims to implement GetOIDCAuthenticatorConfig

View Source
var ReflectTypeIOIDCAuthenticator = di.GetInterfaceReflectType((*IOIDCAuthenticator)(nil))

ReflectTypeIOIDCAuthenticator used when your service claims to implement IOIDCAuthenticator

Functions

func AddGetOIDCAuthenticatorConfigFunc

func AddGetOIDCAuthenticatorConfigFunc(builder *di.Builder, fnc GetOIDCAuthenticatorConfig)

AddSingletonGetOIDCAuthenticatorConfigFunc adds a func to the DI

func AddScopedIOIDCAuthenticator

func AddScopedIOIDCAuthenticator(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)

AddScopedIOIDCAuthenticator adds a type that implements IOIDCAuthenticator

func AddScopedIOIDCAuthenticatorByFunc

func AddScopedIOIDCAuthenticatorByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)

AddScopedIOIDCAuthenticatorByFunc adds a type by a custom func

func AddScopedIOIDCAuthenticatorByFuncWithMetadata

func AddScopedIOIDCAuthenticatorByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddScopedIOIDCAuthenticatorByFuncWithMetadata adds a type by a custom func

func AddScopedIOIDCAuthenticatorWithMetadata

func AddScopedIOIDCAuthenticatorWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddScopedIOIDCAuthenticatorWithMetadata adds a type that implements IOIDCAuthenticator

func AddSingletonIOIDCAuthenticator

func AddSingletonIOIDCAuthenticator(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)

AddSingletonIOIDCAuthenticator adds a type that implements IOIDCAuthenticator

func AddSingletonIOIDCAuthenticatorByFunc

func AddSingletonIOIDCAuthenticatorByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)

AddSingletonIOIDCAuthenticatorByFunc adds a type by a custom func

func AddSingletonIOIDCAuthenticatorByFuncWithMetadata

func AddSingletonIOIDCAuthenticatorByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddSingletonIOIDCAuthenticatorByFuncWithMetadata adds a type by a custom func

func AddSingletonIOIDCAuthenticatorByObj

func AddSingletonIOIDCAuthenticatorByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)

AddSingletonIOIDCAuthenticatorByObj adds a prebuilt obj

func AddSingletonIOIDCAuthenticatorByObjWithMetadata

func AddSingletonIOIDCAuthenticatorByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddSingletonIOIDCAuthenticatorByObjWithMetadata adds a prebuilt obj

func AddSingletonIOIDCAuthenticatorWithMetadata

func AddSingletonIOIDCAuthenticatorWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddSingletonIOIDCAuthenticatorWithMetadata adds a type that implements IOIDCAuthenticator

func AddTransientIOIDCAuthenticator

func AddTransientIOIDCAuthenticator(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)

AddTransientIOIDCAuthenticator adds a type that implements IOIDCAuthenticator

func AddTransientIOIDCAuthenticatorByFunc

func AddTransientIOIDCAuthenticatorByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)

AddTransientIOIDCAuthenticatorByFunc adds a type by a custom func

func AddTransientIOIDCAuthenticatorByFuncWithMetadata

func AddTransientIOIDCAuthenticatorByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddTransientIOIDCAuthenticatorByFuncWithMetadata adds a type by a custom func

func AddTransientIOIDCAuthenticatorWithMetadata

func AddTransientIOIDCAuthenticatorWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)

AddTransientIOIDCAuthenticatorWithMetadata adds a type that implements IOIDCAuthenticator

func GetIOIDCAuthenticatorDefinition

func GetIOIDCAuthenticatorDefinition(ctn di.Container) *di.Def

GetIOIDCAuthenticatorDefinition returns that last definition registered that this container can provide

func GetIOIDCAuthenticatorDefinitions

func GetIOIDCAuthenticatorDefinitions(ctn di.Container) []*di.Def

GetIOIDCAuthenticatorDefinitions returns all definitions that this container can provide

func RemoveAllGetOIDCAuthenticatorConfigFunc

func RemoveAllGetOIDCAuthenticatorConfigFunc(builder *di.Builder)

RemoveAllGetOIDCAuthenticatorConfigFunc removes all GetOIDCAuthenticatorConfig functions from the DI

func RemoveAllIOIDCAuthenticator

func RemoveAllIOIDCAuthenticator(builder *di.Builder)

RemoveAllIOIDCAuthenticator removes all IOIDCAuthenticator from the DI

Types

type AuthenticatorConfig

type AuthenticatorConfig struct {
	Domain       string `json:"domain" mapstructure:"DOMAIN"`
	ClientID     string `json:"client_id" mapstructure:"CLIENT_ID"`
	ClientSecret string `json:"client_secret" mapstructure:"CLIENT_SECRET"`
	CallbackURL  string `json:"callback_url" mapstructure:"CALLBACK_URL"`
	Insecure     bool   `json:"insecure" mapstructure:"INSECURE"`
}

AuthenticatorConfig ...

type GetOIDCAuthenticatorConfig

type GetOIDCAuthenticatorConfig func() *AuthenticatorConfig

GetOIDCAuthenticatorConfig ...

func GetGetOIDCAuthenticatorConfigFromContainer

func GetGetOIDCAuthenticatorConfigFromContainer(ctn di.Container) GetOIDCAuthenticatorConfig

GetGetOIDCAuthenticatorConfigFromContainer alternative to SafeGetGetOIDCAuthenticatorConfigFromContainer but panics of object is not present

func GetManyGetOIDCAuthenticatorConfigFromContainer

func GetManyGetOIDCAuthenticatorConfigFromContainer(ctn di.Container) []GetOIDCAuthenticatorConfig

GetManyGetOIDCAuthenticatorConfigFromContainer alternative to SafeGetManyGetOIDCAuthenticatorConfigFromContainer but panics of object is not present

func SafeGetGetOIDCAuthenticatorConfigFromContainer

func SafeGetGetOIDCAuthenticatorConfigFromContainer(ctn di.Container) (GetOIDCAuthenticatorConfig, error)

SafeGetGetOIDCAuthenticatorConfigFromContainer trys to get the object by type, will not panic, returns nil and error

func SafeGetManyGetOIDCAuthenticatorConfigFromContainer

func SafeGetManyGetOIDCAuthenticatorConfigFromContainer(ctn di.Container) ([]GetOIDCAuthenticatorConfig, error)

SafeGetManyGetOIDCAuthenticatorConfigFromContainer trys to get the object by type, will not panic, returns nil and error

type IOIDCAuthenticator

type IOIDCAuthenticator interface {
	contracts_oauth2.IOAuth2Authenticator
	VerifyIDToken(ctx context.Context, token *oauth2.Token) (*oidc.IDToken, error)
	ValidateJWTAccessToken(accessToken string) (*services_oidc.AccessToken, error)
}

IOIDCAuthenticator ...

func GetIOIDCAuthenticatorFromContainer

func GetIOIDCAuthenticatorFromContainer(ctn di.Container) IOIDCAuthenticator

GetIOIDCAuthenticatorFromContainer alternative to SafeGetIOIDCAuthenticatorFromContainer but panics of object is not present

func GetManyIOIDCAuthenticatorFromContainer

func GetManyIOIDCAuthenticatorFromContainer(ctn di.Container) []IOIDCAuthenticator

GetManyIOIDCAuthenticatorFromContainer alternative to SafeGetManyIOIDCAuthenticatorFromContainer but panics of object is not present

func SafeGetIOIDCAuthenticatorFromContainer

func SafeGetIOIDCAuthenticatorFromContainer(ctn di.Container) (IOIDCAuthenticator, error)

SafeGetIOIDCAuthenticatorFromContainer trys to get the object by type, will not panic, returns nil and error

func SafeGetManyIOIDCAuthenticatorFromContainer

func SafeGetManyIOIDCAuthenticatorFromContainer(ctn di.Container) ([]IOIDCAuthenticator, error)

SafeGetManyIOIDCAuthenticatorFromContainer trys to get the object by type, will not panic, returns nil and error

Jump to

Keyboard shortcuts

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