config

package
v0.0.651 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: Apache-2.0 Imports: 3 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cookie struct {
	Secret string `json:"secret,omitempty"`
}

Cookie holds the secret returned from github that authenticates the user who authorized this app.

type GithubOAuthConfig

type GithubOAuthConfig struct {
	ClientID         string   `json:"client_id"`
	ClientSecret     string   `json:"client_secret"`
	RedirectURL      string   `json:"redirect_url"`
	Scopes           []string `json:"scopes,omitempty"`
	FinalRedirectURL string   `json:"final_redirect_url"`

	CookieStore *sessions.CookieStore `json:"-"`
}

GithubOAuthConfig is a config for requesting users access tokens from Github API. It also has a Cookie Store that retains user credentials deriving from Github API.

func (*GithubOAuthConfig) InitGithubOAuthConfig

func (gac *GithubOAuthConfig) InitGithubOAuthConfig(cookie *sessions.CookieStore)

InitGithubOAuthConfig creates an OAuthClient using GithubOAuth config and a Cookie Store to retain user credentials.

Jump to

Keyboard shortcuts

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