auth

package
v0.0.0-...-20a8e94 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigurationFields

func ConfigurationFields(providerType string) []object.ProviderConfigurationField

func GetAuthTypes

func GetAuthTypes() []string

Types

type Provider

type Provider interface {
	GetConfigurationFields() []object.ProviderConfigurationField
	ValidateConfigurationFields() error
	// Configure is used for set up a new credential object. It returns the finished metadata which can be saved.
	Configure(ctx context.Context, providerContext ProviderContext, data map[string]any) (map[string]any, error)
	Validate(ctx context.Context, providerContext ProviderContext, data map[string]any) (bool, map[string]any, error)
	Begin(ctx context.Context, providerContext ProviderContext) (map[string]any, error)
	Submit(ctx context.Context, providerContext ProviderContext, data map[string]any) (bool, error)
}

func GetAuthProvider

func GetAuthProvider(provider object.Provider) (Provider, error)

type ProviderContext

type ProviderContext struct {
	Tenant     object.Tenant
	User       object.User
	Credential object.Credentials

	SendMail func(ctx context.Context, data object.SendMailData)
}

Jump to

Keyboard shortcuts

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