Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Google = &googleProvider{}
Google is the google auth Provider.
View Source
var ( // ProvidersList is the list of all the providers configured for the API // server, this is populated by ConfigureProviders function. ProvidersList []Provider )
Functions ¶
func ConfigureProviders ¶
func ConfigureProviders()
ConfigureProviders configures all the provider available and registers them in the ProvidersList.
Types ¶
type Provider ¶
type Provider interface { // Type returns the type of provider. Type() ProviderType // Configured checks if the provider is configured or not. Configured() bool // Configure helps us to initialize any variables or setup requirements. Configure() // GetLoginURL returns the URL which redirects user to the providers login page. GetLoginURL() string // GetUser gets the user after requesting the OAuth provider. // Returns the user, status code and error if any. GetUser(*gin.Context) (*User, int, error) }
Provider is an interface that represents any provider through which we can authenticate a user on the application.
type ProviderType ¶
type ProviderType string
ProviderType for different OAuth Providers supported in xene
Click to show internal directories.
Click to hide internal directories.