Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ScopeProfile allows the client to access the user's // profile info. ScopeProfile string = "profile" //ScopeEmail allows the cient to access the user's // email address. ScopeEmail string = "email" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct { IdentityURL string // contains filtered or unexported fields }
Provider holds all the info for our Oauth2 provider.
func New ¶
func New() *Provider
New returns a new provider. Some providers have their endpoints as part of the Oauth2 package, and Google is one of them.
func (*Provider) BuildAuthURL ¶
BuildAuthURL builds the authentication endpoint that we redirect our users to.
func (*Provider) GetCodeURL ¶
GetCodeURL gets the short-lived access code from the callback URL that we can exchange for an access token.
func (*Provider) GetIdentity ¶
GetIdentity gets the client's identity from the provider.
Click to show internal directories.
Click to hide internal directories.