vendors

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: MIT Imports: 8 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",
	},
}

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