Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterGenericProvider ¶
func RegisterGenericProvider(factory GenericProviderFactory)
RegisterOAuthProvider register GenericProviderFactory with the specified type
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 GenericProvider ¶
type GenericProvider interface { // Authenticate from remote server Authenticate(username string, password string) (Identity, error) }
func GetGenericProvider ¶
func GetGenericProvider(providerName string) (GenericProvider, error)
GetGenericProvider returns GenericProvider with given name
type GenericProviderFactory ¶
type GenericProviderFactory interface { // Type unique type of the provider Type() string // Apply the dynamic options from ai-config Create(options oauth.DynamicOptions) (GenericProvider, error) }
type Identity ¶
type Identity interface { // required // Identifier for the End-User at the Issuer. GetUserID() string // optional // The username which the End-User wishes to be referred to ai. GetUsername() string // optional GetEmail() string }
Identity represents the account mapped to ai
type OAuthProvider ¶
type OAuthProvider interface { // IdentityExchange exchange identity from remote server IdentityExchange(code string) (Identity, error) }
func GetOAuthProvider ¶
func GetOAuthProvider(providerName string) (OAuthProvider, error)
GetGenericProvider returns OAuthProvider with given name
type OAuthProviderFactory ¶
type OAuthProviderFactory interface { // Type unique type of the provider Type() string // Apply the dynamic options from ai-config Create(options oauth.DynamicOptions) (OAuthProvider, error) }
Click to show internal directories.
Click to hide internal directories.