Documentation ¶
Index ¶
- Variables
- func AddGetOIDCAuthenticatorConfigFunc(builder *di.Builder, fnc GetOIDCAuthenticatorConfig)
- func AddScopedIOIDCAuthenticator(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddScopedIOIDCAuthenticatorByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIOIDCAuthenticatorByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIOIDCAuthenticatorWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddSingletonIOIDCAuthenticator(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddSingletonIOIDCAuthenticatorByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIOIDCAuthenticatorByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIOIDCAuthenticatorByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
- func AddSingletonIOIDCAuthenticatorByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, ...)
- func AddSingletonIOIDCAuthenticatorWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddTransientIOIDCAuthenticator(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddTransientIOIDCAuthenticatorByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIOIDCAuthenticatorByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIOIDCAuthenticatorWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func GetIOIDCAuthenticatorDefinition(ctn di.Container) *di.Def
- func GetIOIDCAuthenticatorDefinitions(ctn di.Container) []*di.Def
- func RemoveAllGetOIDCAuthenticatorConfigFunc(builder *di.Builder)
- func RemoveAllIOIDCAuthenticator(builder *di.Builder)
- type AuthenticatorConfig
- type GetOIDCAuthenticatorConfig
- func GetGetOIDCAuthenticatorConfigFromContainer(ctn di.Container) GetOIDCAuthenticatorConfig
- func GetManyGetOIDCAuthenticatorConfigFromContainer(ctn di.Container) []GetOIDCAuthenticatorConfig
- func SafeGetGetOIDCAuthenticatorConfigFromContainer(ctn di.Container) (GetOIDCAuthenticatorConfig, error)
- func SafeGetManyGetOIDCAuthenticatorConfigFromContainer(ctn di.Container) ([]GetOIDCAuthenticatorConfig, error)
- type IOIDCAuthenticator
- func GetIOIDCAuthenticatorFromContainer(ctn di.Container) IOIDCAuthenticator
- func GetManyIOIDCAuthenticatorFromContainer(ctn di.Container) []IOIDCAuthenticator
- func SafeGetIOIDCAuthenticatorFromContainer(ctn di.Container) (IOIDCAuthenticator, error)
- func SafeGetManyIOIDCAuthenticatorFromContainer(ctn di.Container) ([]IOIDCAuthenticator, error)
Constants ¶
This section is empty.
Variables ¶
var ReflectTypeGetOIDCAuthenticatorConfig = reflect.TypeOf(GetOIDCAuthenticatorConfig(nil))
ReflectTypeGetOIDCAuthenticatorConfig used when your service claims to implement GetOIDCAuthenticatorConfig
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 ¶
GetIOIDCAuthenticatorDefinition returns that last definition registered that this container can provide
func GetIOIDCAuthenticatorDefinitions ¶
GetIOIDCAuthenticatorDefinitions returns all definitions that this container can provide
func RemoveAllGetOIDCAuthenticatorConfigFunc ¶
RemoveAllGetOIDCAuthenticatorConfigFunc removes all GetOIDCAuthenticatorConfig functions from the DI
func RemoveAllIOIDCAuthenticator ¶
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"` }
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