oauth2

package
v0.3.10-0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 9 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOAuth2Driver

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

func Register

func Register(factory IOAuth2DriverFactory)

Types

type IOAuth2Driver

type IOAuth2Driver interface {
	Authenticate(ctx context.Context, code string) (map[string][]string, error)
	GetSsoRedirectUri(ctx context.Context, callbackUrl, state string) (string, error)
}

type IOAuth2DriverFactory

type IOAuth2DriverFactory interface {
	NewDriver(appId string, secret string) IOAuth2Driver
	TemplateName() string
	IdpAttributeOptions() api.SIdpAttributeOptions
	ValidateConfig(conf api.SOAuth2IdpConfigOptions) error
}

type SOAuth2BaseDriver

type SOAuth2BaseDriver struct {
	AppId  string
	Secret string
}

type SOAuth2Driver

type SOAuth2Driver struct {
	driver.SBaseIdentityDriver
	// contains filtered or unexported fields
}

OAuth2.0

func (*SOAuth2Driver) Authenticate

func (*SOAuth2Driver) GetSsoRedirectUri

func (self *SOAuth2Driver) GetSsoRedirectUri(ctx context.Context, callbackUrl, state string) (string, error)

func (*SOAuth2Driver) Probe

func (self *SOAuth2Driver) Probe(ctx context.Context) error

func (*SOAuth2Driver) Sync

func (self *SOAuth2Driver) Sync(ctx context.Context) error

type SOAuth2DriverClass

type SOAuth2DriverClass struct{}

func (*SOAuth2DriverClass) ForceSyncUser

func (self *SOAuth2DriverClass) ForceSyncUser() bool

func (*SOAuth2DriverClass) GetDefaultIconUri

func (self *SOAuth2DriverClass) GetDefaultIconUri(tmpName string) string

func (*SOAuth2DriverClass) IsSso

func (self *SOAuth2DriverClass) IsSso() bool

func (*SOAuth2DriverClass) Name

func (self *SOAuth2DriverClass) Name() string

func (*SOAuth2DriverClass) NewDriver

func (self *SOAuth2DriverClass) NewDriver(idpId, idpName, template, targetDomainId string, conf api.TConfigs) (driver.IIdentityBackend, error)

func (*SOAuth2DriverClass) SingletonInstance

func (self *SOAuth2DriverClass) SingletonInstance() bool

func (*SOAuth2DriverClass) SyncMethod

func (self *SOAuth2DriverClass) SyncMethod() string

func (*SOAuth2DriverClass) ValidateConfig

func (self *SOAuth2DriverClass) ValidateConfig(ctx context.Context, userCred mcclient.TokenCredential, template string, tconf api.TConfigs, idpId, domainId string) (api.TConfigs, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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