oauth2

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpGet

func HttpGet(geturl string) (string, error)

func HttpGetByte

func HttpGetByte(geturl string) ([]byte, error)

func HttpPost

func HttpPost(geturl string) (string, error)

Types

type OAuthConfig

type OAuthConfig struct {
	// ClientID is the application's ID.
	// 应用ID
	ClientID string

	// ClientSecret is the application's secret.
	// 应用密钥
	ClientSecret string

	// Endpoint contains the resource server's token endpoint
	// URLs. These are constants specific to each server and are
	// often available via site-specific packages, such as
	// google.Endpoint or github.Endpoint.
	// 获取授权地址
	AuthURL string
	// 获取token地址
	TokenURL string

	// RedirectURL is the URL to redirect users going through
	// the OAuth flow, after the resource owner's URLs.
	// 回调地址
	RedirectURL string

	// 需要申请的服务权限
	// Scope specifies optional requested permissions.
	Scopes []string
}

基本配置

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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