oauth

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRandomState

func CreateRandomState() string

func GetAccessToken

func GetAccessToken(
	o *integrations.OAuthIntegration,
	conf *oauth2.Config,
	repo repository.Repository,
) (string, *time.Time, error)

GetAccessToken retrieves an access token for a given client. It updates the access token in the DB if necessary

func NewDigitalOceanClient

func NewDigitalOceanClient(cfg *Config) *oauth2.Config

func NewGithubClient

func NewGithubClient(cfg *Config) *oauth2.Config

func NewGoogleClient added in v0.3.1

func NewGoogleClient(cfg *Config) *oauth2.Config

Types

type Config

type Config struct {
	ClientID     string
	ClientSecret string
	Scopes       []string
	BaseURL      string
}

type GithubAppConf added in v0.5.0

type GithubAppConf struct {
	AppName       string
	WebhookSecret string
	oauth2.Config
}

GithubAppConf is standard oauth2 config but it need to keeps track of the app name and webhook secret

func NewGithubAppClient added in v0.5.0

func NewGithubAppClient(cfg *Config, name string, secret string) *GithubAppConf

Jump to

Keyboard shortcuts

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