oauth2

package
v0.1.327 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReflectTypeGetOAuth2AuthenticatorConfig = reflect.TypeOf(GetOAuth2AuthenticatorConfig(nil))

ReflectTypeGetOAuth2AuthenticatorConfig used when your service claims to implement GetOAuth2AuthenticatorConfig

View Source
var ReflectTypeIOAuth2Authenticator = di.GetInterfaceReflectType((*IOAuth2Authenticator)(nil))

ReflectTypeIOAuth2Authenticator used when your service claims to implement IOAuth2Authenticator

Functions

func AddGetOAuth2AuthenticatorConfigFunc added in v0.1.240

func AddGetOAuth2AuthenticatorConfigFunc(builder *di.Builder, fnc GetOAuth2AuthenticatorConfig)

AddSingletonGetOAuth2AuthenticatorConfigFunc adds a func to the DI

func AddScopedIOAuth2Authenticator added in v0.1.240

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

AddScopedIOAuth2Authenticator adds a type that implements IOAuth2Authenticator

func AddScopedIOAuth2AuthenticatorByFunc added in v0.1.240

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

AddScopedIOAuth2AuthenticatorByFunc adds a type by a custom func

func AddScopedIOAuth2AuthenticatorByFuncWithMetadata added in v0.1.240

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

AddScopedIOAuth2AuthenticatorByFuncWithMetadata adds a type by a custom func

func AddScopedIOAuth2AuthenticatorWithMetadata added in v0.1.240

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

AddScopedIOAuth2AuthenticatorWithMetadata adds a type that implements IOAuth2Authenticator

func AddSingletonIOAuth2Authenticator added in v0.1.240

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

AddSingletonIOAuth2Authenticator adds a type that implements IOAuth2Authenticator

func AddSingletonIOAuth2AuthenticatorByFunc added in v0.1.240

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

AddSingletonIOAuth2AuthenticatorByFunc adds a type by a custom func

func AddSingletonIOAuth2AuthenticatorByFuncWithMetadata added in v0.1.240

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

AddSingletonIOAuth2AuthenticatorByFuncWithMetadata adds a type by a custom func

func AddSingletonIOAuth2AuthenticatorByObj added in v0.1.240

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

AddSingletonIOAuth2AuthenticatorByObj adds a prebuilt obj

func AddSingletonIOAuth2AuthenticatorByObjWithMetadata added in v0.1.240

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

AddSingletonIOAuth2AuthenticatorByObjWithMetadata adds a prebuilt obj

func AddSingletonIOAuth2AuthenticatorWithMetadata added in v0.1.240

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

AddSingletonIOAuth2AuthenticatorWithMetadata adds a type that implements IOAuth2Authenticator

func AddTransientIOAuth2Authenticator added in v0.1.240

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

AddTransientIOAuth2Authenticator adds a type that implements IOAuth2Authenticator

func AddTransientIOAuth2AuthenticatorByFunc added in v0.1.240

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

AddTransientIOAuth2AuthenticatorByFunc adds a type by a custom func

func AddTransientIOAuth2AuthenticatorByFuncWithMetadata added in v0.1.240

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

AddTransientIOAuth2AuthenticatorByFuncWithMetadata adds a type by a custom func

func AddTransientIOAuth2AuthenticatorWithMetadata added in v0.1.240

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

AddTransientIOAuth2AuthenticatorWithMetadata adds a type that implements IOAuth2Authenticator

func GetIOAuth2AuthenticatorDefinition added in v0.1.240

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

GetIOAuth2AuthenticatorDefinition returns that last definition registered that this container can provide

func GetIOAuth2AuthenticatorDefinitions added in v0.1.240

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

GetIOAuth2AuthenticatorDefinitions returns all definitions that this container can provide

func RemoveAllGetOAuth2AuthenticatorConfigFunc added in v0.1.240

func RemoveAllGetOAuth2AuthenticatorConfigFunc(builder *di.Builder)

RemoveAllGetOAuth2AuthenticatorConfigFunc removes all GetOAuth2AuthenticatorConfig functions from the DI

func RemoveAllIOAuth2Authenticator added in v0.1.240

func RemoveAllIOAuth2Authenticator(builder *di.Builder)

RemoveAllIOAuth2Authenticator removes all IOAuth2Authenticator from the DI

Types

type GetOAuth2AuthenticatorConfig added in v0.1.240

type GetOAuth2AuthenticatorConfig func() *oauth2.Config

GetOAuth2AuthenticatorConfig ...

func GetGetOAuth2AuthenticatorConfigFromContainer added in v0.1.240

func GetGetOAuth2AuthenticatorConfigFromContainer(ctn di.Container) GetOAuth2AuthenticatorConfig

GetGetOAuth2AuthenticatorConfigFromContainer alternative to SafeGetGetOAuth2AuthenticatorConfigFromContainer but panics of object is not present

func GetManyGetOAuth2AuthenticatorConfigFromContainer added in v0.1.240

func GetManyGetOAuth2AuthenticatorConfigFromContainer(ctn di.Container) []GetOAuth2AuthenticatorConfig

GetManyGetOAuth2AuthenticatorConfigFromContainer alternative to SafeGetManyGetOAuth2AuthenticatorConfigFromContainer but panics of object is not present

func SafeGetGetOAuth2AuthenticatorConfigFromContainer added in v0.1.240

func SafeGetGetOAuth2AuthenticatorConfigFromContainer(ctn di.Container) (GetOAuth2AuthenticatorConfig, error)

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

func SafeGetManyGetOAuth2AuthenticatorConfigFromContainer added in v0.1.240

func SafeGetManyGetOAuth2AuthenticatorConfigFromContainer(ctn di.Container) ([]GetOAuth2AuthenticatorConfig, error)

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

type IOAuth2Authenticator added in v0.1.240

type IOAuth2Authenticator interface {
	AuthCodeURL(state string, opts ...oauth2.AuthCodeOption) string
	Exchange(ctx context.Context, code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)
	GetTokenSource(ctx context.Context, token *oauth2.Token) oauth2.TokenSource
}

IOAuth2Authenticator ...

func GetIOAuth2AuthenticatorFromContainer added in v0.1.240

func GetIOAuth2AuthenticatorFromContainer(ctn di.Container) IOAuth2Authenticator

GetIOAuth2AuthenticatorFromContainer alternative to SafeGetIOAuth2AuthenticatorFromContainer but panics of object is not present

func GetManyIOAuth2AuthenticatorFromContainer added in v0.1.240

func GetManyIOAuth2AuthenticatorFromContainer(ctn di.Container) []IOAuth2Authenticator

GetManyIOAuth2AuthenticatorFromContainer alternative to SafeGetManyIOAuth2AuthenticatorFromContainer but panics of object is not present

func SafeGetIOAuth2AuthenticatorFromContainer added in v0.1.240

func SafeGetIOAuth2AuthenticatorFromContainer(ctn di.Container) (IOAuth2Authenticator, error)

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

func SafeGetManyIOAuth2AuthenticatorFromContainer added in v0.1.240

func SafeGetManyIOAuth2AuthenticatorFromContainer(ctn di.Container) ([]IOAuth2Authenticator, error)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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