oauth

package
v2.0.2-rc.22 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Google = "google"
	Github = "github"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Oauth

type Oauth interface {
	AuthCodeURL() (string, error)
	Exchange(string) (*oauth2.Token, error)
	GetUser(*oauth2.Token) (*User, error)
}

func New

func New(name, clientID, clientSecret, redirectURL string) (Oauth, error)

type User

type User struct {
	Name   string
	Email  string
	Avatar string
}

Jump to

Keyboard shortcuts

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