Documentation ¶
Index ¶
Constants ¶
View Source
const (
GoogleProvider = "Google"
)
Available providers.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Google ¶
type Google struct {
// contains filtered or unexported fields
}
Google is the provider for Google Authentication.
func NewGoogleProvider ¶
NewGoogleProvider initializes the provider for Gooogle.
func (Google) AccessToken ¶
AccessToken retrieves an access token user has returned from Google.
func (Google) RedirectURL ¶
RedirectURL returns the redirect URL for authentication.
type Provider ¶
type Provider interface { // Returns the provider's name. Name() string // Returns the redirect URL for authentication with the provider. RedirectURL() string // Retrieves an access token user has returned from provider. AccessToken(code string) (*oauth2.Token, error) // Retrieves information about the user from the provider. UserInfo(token *oauth2.Token) (ProviderUser, error) }
Provider is an authentication provider such as Facebook and Google.
Click to show internal directories.
Click to hide internal directories.