auth

package
v0.0.0-...-758a821 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientID  = "826db533af5eefa85c71"
	DeviceURI = "https://github.com/login/device/code"
	PollURL   = "https://github.com/login/oauth/access_token"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHub

type GitHub struct {
	HttpClient *http.Client
	Scopes     []string
}

func (*GitHub) RequestCodeAndPollToken

func (gh *GitHub) RequestCodeAndPollToken() (*api.AccessToken, error)

type Repository

type Repository struct {
	Name      string
	URL       string
	CreatedAt string
}

type User

type User struct {
	Name  string
	URL   string
	Email string
	Repos []*Repository
}

func GetInfo

func GetInfo(provider string, ctx *cmdutil.CmdContext) (*User, error)

Jump to

Keyboard shortcuts

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