oauth

package
v2.1.53 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 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
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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