provider

package
v0.3.0-alpha-2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OAuth2Provider

type OAuth2Provider string

type Oauth2Option

type Oauth2Option struct {
	ClientID     string
	ClientSecret string
	RedirectURL  string
}

type ProviderInterface

type ProviderInterface interface {
	Init(Oauth2Option)
	Provider() OAuth2Provider
	NewAuthURL(string) string
	GetToken(context.Context, string) (*oauth2.Token, error)
	RefreshToken(context.Context, string) (*oauth2.Token, error)
	GetUserInfo(context.Context, *oauth2.Token) (*UserInfo, error)
}

type UserInfo

type UserInfo struct {
	Username       string
	ProviderUserID uint64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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