identityprovider

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterOAuthProvider

func RegisterOAuthProvider(factory OAuthProviderFactory)

RegisterOAuthProvider register OAuthProviderFactory with the specified type

func SetupWithOptions

func SetupWithOptions(options []oauth.IdentityProviderOptions) error

SetupWithOptions will verify the configuration and initialize the identityProviders

Types

type Identity

type Identity interface {
	GetUserID() string
	GetUsername() string
	GetEmail() string
}

type OAuthProvider

type OAuthProvider interface {
	IdentityExchange(req *http.Request) (Identity, error)
}

func GetOAuthProvider

func GetOAuthProvider(providerName string) (OAuthProvider, error)

GetOAuthProvider returns OAuthProvider with given name

type OAuthProviderFactory

type OAuthProviderFactory interface {
	Type() string
	Create(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