Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ScopeUserRead provides read access to non-public user information, such // as their email address. ScopeUserRead string = "user_read" // ScopeUserBlocksEdit provides the ability to ignore or unignore on // behalf of a user. ScopeUserBlocksEdit string = "user_blocks_edit" // ScopeUserBlocksRead provides read access to a user's list of ignored // users. ScopeUserBlocksRead string = "user_blocks_read" // ScopeUserFollowsEdit provides access to manage a user's followed // channels. ScopeUserFollowsEdit string = "user_follows_edit" // ScopeChannelRead provides read access to non-public channel information, // including email address and stream key. ScopeChannelRead string = "channel_read" // ScopeChannelEditor provides write access to channel metadata (game, // status, etc). ScopeChannelEditor string = "channel_editor" // ScopeChannelCommercial provides access to trigger commercials on // channel. ScopeChannelCommercial string = "channel_commercial" // ScopeChannelStream provides the ability to reset a channel's stream key. ScopeChannelStream string = "channel_stream" // ScopeChannelSubscriptions provides read access to all subscribers to // your channel. ScopeChannelSubscriptions string = "channel_subscriptions" // ScopeUserSubscriptions provides read access to subscriptions of a user. ScopeUserSubscriptions string = "user_subscriptions" // ScopeChannelCheckSubscription provides read access to check if a user is // subscribed to your channel. ScopeChannelCheckSubscription string = "channel_check_subscription" // ScopeChatLogin provides the ability to log into chat and send messages. ScopeChatLogin string = "chat_login" )
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. It's essentially a wrapper around the Oauth2 config to have an identity URL field.
func New ¶
func New() *Provider
New returns a new provider. Some providers have their endpoints as part of the Oauth2 package. Twitch is not one of them, so it must be entered manually.
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 sp we can exchange it 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.