Version: v1.0.1 Latest Latest

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

Go to latest
Published: Feb 9, 2022 License: MIT Imports: 28 Imported by: 2




This section is empty.


This section is empty.


This section is empty.


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 Email

type Email struct {
	Email    string
	Verified bool
	Primary  bool

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 RequestError added in v1.0.1

type RequestError struct {
	// contains filtered or unexported fields

func (*RequestError) Error added in v1.0.1

func (r *RequestError) Error() string

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 {
	Emails   []Email
	Metadata map[string]string

Jump to

Keyboard shortcuts

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