oauth

package
v1.9.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScopeIdentify             = "identify"
	ScopeBot                  = "bot"
	ScopeEmail                = "email"
	ScopeGuilds               = "guilds"
	ScopeGuildsJoin           = "guilds.join"
	ScopeConnections          = "connections"
	ScopeGroupDMJoin          = "gdm.join"
	ScopeMessagesRead         = "messages.read"
	ScopeRPC                  = "rpc"
	ScopeRPCAPI               = "rpc.api"
	ScopeRPCNotificationsRead = "rpc.notifications.read"
	ScopeWebhookIncoming      = "webhook.Incoming"
)

Discord OAuth2 scope.

Variables

This section is empty.

Functions

func Client

func Client(context *gin.Context, conf *oauth2.Config) *http.Client

Client returns pointer to an http.Client.

func Endpoint

func Endpoint() oauth2.Endpoint

Endpoint returns discord OAuth2 endpoints.

func GetToken

func GetToken(context *gin.Context) *oauth2.Token

GetToken gets a token stored in session in a context.

func RemoveToken

func RemoveToken(context *gin.Context)

RemoveToken removes a token in session in a context.

func StoreToken

func StoreToken(context *gin.Context, token *oauth2.Token)

StoreToken stores a token in session in a context.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL