provider

package
v0.0.0-...-1198813 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2019 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigX509KeyStore

type ConfigX509KeyStore struct {
	InstanceID uuid.UUID
	DB         *storage.Connection
	Conf       conf.SamlProviderConfiguration
}

func (ConfigX509KeyStore) CreateSigningCert

func (ks ConfigX509KeyStore) CreateSigningCert() (*rsa.PrivateKey, []byte, error)

func (ConfigX509KeyStore) GetKeyPair

func (ks ConfigX509KeyStore) GetKeyPair() (*rsa.PrivateKey, []byte, error)

func (ConfigX509KeyStore) SaveConfig

func (ks ConfigX509KeyStore) SaveConfig(cert []byte, key *rsa.PrivateKey) error

type OAuthProvider

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

OAuthProvider specifies additional methods needed for providers using OAuth

func NewBitbucketProvider

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

NewBitbucketProvider creates a Bitbucket account provider.

func NewFacebookProvider

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

NewFacebookProvider creates a Facebook account provider.

func NewGithubProvider

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

NewGithubProvider creates a Github account provider.

func NewGitlabProvider

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

NewGitlabProvider creates a Gitlab account provider.

func NewGoogleProvider

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

NewGoogleProvider creates a Google account provider.

type Provider

type Provider interface {
	AuthCodeURL(string, ...oauth2.AuthCodeOption) string
}

Provider is an interface for interacting with external account providers

type SamlProvider

type SamlProvider struct {
	ServiceProvider *saml2.SAMLServiceProvider
}

func NewSamlProvider

func NewSamlProvider(ext conf.SamlProviderConfiguration, db *storage.Connection, instanceId uuid.UUID) (*SamlProvider, error)

NewSamlProvider creates a Saml account provider.

func (SamlProvider) AuthCodeURL

func (p SamlProvider) AuthCodeURL(tokenString string, args ...oauth2.AuthCodeOption) string

func (SamlProvider) SPMetadata

func (p SamlProvider) SPMetadata() ([]byte, error)

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