driver

package
v0.0.0-...-2b29b9b Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 6 Imported by: 8

Documentation

Index

Constants

View Source
const (
	ErrNoSuchDriver = errors.Error("no such driver")
)

Variables

This section is empty.

Functions

func RegisterDriverClass

func RegisterDriverClass(drv IIdentityBackendClass)

Types

type IIdentityBackend

type IIdentityBackend interface {
	Authenticate(ctx context.Context, identity mcclient.SAuthenticationIdentity) (*api.SUserExtended, error)
	GetSsoRedirectUri(ctx context.Context, callbackUrl, state string) (string, error)
	GetSsoCallbackUri(callbackUrl string) string
	Sync(ctx context.Context) error
	Probe(ctx context.Context) error
}

func GetDriver

func GetDriver(driver string, idpId, idpName, template, targetDomainId string, conf api.TConfigs) (IIdentityBackend, error)

type IIdentityBackendClass

type IIdentityBackendClass interface {
	SingletonInstance() bool
	SyncMethod() string
	Name() string
	NewDriver(idpId, idpName, template, targetDomainId string, conf api.TConfigs) (IIdentityBackend, error)
	ValidateConfig(ctx context.Context, userCred mcclient.TokenCredential, template string, conf api.TConfigs, idpId, domainId string) (api.TConfigs, error)
	IsSso() bool
	GetDefaultIconUri(tmpName string) string
	ForceSyncUser() bool
}

func GetDriverClass

func GetDriverClass(drv string) IIdentityBackendClass

type SBaseIdentityDriver

type SBaseIdentityDriver struct {
	object.SObject

	Config   api.TConfigs
	IdpId    string
	IdpName  string
	Template string

	TargetDomainId string
}

func NewBaseIdentityDriver

func NewBaseIdentityDriver(idpId, idpName, template, targetDomainId string, conf api.TConfigs) (SBaseIdentityDriver, error)

func (*SBaseIdentityDriver) GetSsoCallbackUri

func (base *SBaseIdentityDriver) GetSsoCallbackUri(callbackUrl string) string

func (*SBaseIdentityDriver) IIdentityBackend

func (base *SBaseIdentityDriver) IIdentityBackend() IIdentityBackend

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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