provider

package
v0.0.0-...-cadf765 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	AuthCodeURL(string, ...oauth2.AuthCodeOption) string
	GetUserData(context.Context, *oauth2.Token) (*UserProvidedData, error)
	GetOAuthToken(string) (*oauth2.Token, error)
}

Provider is an interface for interacting with external account providers

func NewBitbucketProvider

func NewBitbucketProvider(ext conf.OAuthProviderConfiguration) (Provider, error)

NewBitbucketProvider creates a Bitbucket account provider.

func NewFacebookProvider

func NewFacebookProvider(ext conf.OAuthProviderConfiguration) (Provider, error)

NewFacebookProvider creates a Facebook account provider.

func NewGithubProvider

func NewGithubProvider(ext conf.OAuthProviderConfiguration) (Provider, error)

NewGithubProvider creates a Github account provider.

func NewGitlabProvider

func NewGitlabProvider(ext conf.OAuthProviderConfiguration) (Provider, error)

NewGitlabProvider creates a Gitlab account provider.

func NewGoogleProvider

func NewGoogleProvider(ext conf.OAuthProviderConfiguration) (Provider, error)

NewGoogleProvider creates a Google account provider.

type UserProvidedData

type UserProvidedData struct {
	Email    string
	Verified bool
	Metadata map[string]string
}

Jump to

Keyboard shortcuts

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