driver

package
v0.3.9-5 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

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