oauth

package
v2.1.50 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 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
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

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