identityprovider

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: Apache-2.0 Imports: 14 Imported by: 4

Documentation

Index

Constants

View Source
const (
	LdapIdentityProvider = "LDAPIdentityProvider"
)

Variables

View Source
var (
	ErrorIdentityProviderNotFound = errors.New("the identity provider was not found")
)

Functions

func RegisterOAuthProvider

func RegisterOAuthProvider(provider OAuthProvider)

Types

type Identity

type Identity interface {
	GetName() string
	GetEmail() string
}

type LdapProvider

type LdapProvider interface {
	Authenticate(username string, password string) (*iamv1alpha2.User, error)
}

func NewLdapProvider

func NewLdapProvider(options *oauth.DynamicOptions) (LdapProvider, error)

type OAuthProvider

type OAuthProvider interface {
	Type() string
	Setup(options *oauth.DynamicOptions) (OAuthProvider, error)
	IdentityExchange(code string) (Identity, error)
}

func GetOAuthProvider

func GetOAuthProvider(providerType string, options *oauth.DynamicOptions) (OAuthProvider, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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