vendors

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OAuthProviderApps = []string{
	github.ID,
	pocket.ID,
	dropbox.ID,
}
View Source
var ProviderCredentialOptions = map[string]interface{}{
	github.ID: map[string]string{
		github.ClientIdKey:     "Client ID",
		github.ClientSecretKey: "Client secrets",
	},
	pocket.ID: map[string]string{
		pocket.ClientIdKey: "Consumer Key",
	},
	pushover.ID: map[string]string{
		pushover.TokenKey: "API Token",
		pushover.UserKey:  "User Key",
	},
	dropbox.ID: map[string]string{
		dropbox.ClientIdKey:     "App key",
		dropbox.ClientSecretKey: "App secret",
	},
	email.ID: map[string]string{
		email.Host:     "SMTP Host",
		email.Port:     "SMTP Port",
		email.Username: "Username Mail",
		email.Password: "Password",
	},
	cloudflare.ID: map[string]string{
		cloudflare.Token:     "Api Token",
		cloudflare.ZoneID:    "Zone ID",
		cloudflare.AccountID: "Account ID",
	},
}

Functions

This section is empty.

Types

type OAuthProvider

type OAuthProvider interface {
	AuthorizeURL() string
	GetAccessToken(code string) (interface{}, error)
	Redirect(c *fiber.Ctx, mid pb.MiddleClient) error
	StoreAccessToken(c *fiber.Ctx, mid pb.MiddleClient) error
}

func NewOAuthProvider

func NewOAuthProvider(rdb *redis.Client, c *fiber.Ctx, url string) OAuthProvider

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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