Documentation ¶
Index ¶
- type ConfigX509KeyStore
- type OAuthProvider
- func NewBitbucketProvider(ext conf.OAuthProviderConfiguration) (OAuthProvider, error)
- func NewFacebookProvider(ext conf.OAuthProviderConfiguration) (OAuthProvider, error)
- func NewGithubProvider(ext conf.OAuthProviderConfiguration) (OAuthProvider, error)
- func NewGitlabProvider(ext conf.OAuthProviderConfiguration) (OAuthProvider, error)
- func NewGoogleProvider(ext conf.OAuthProviderConfiguration) (OAuthProvider, error)
- type Provider
- type SamlProvider
- type UserProvidedData
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 }
ConfigX509KeyStore keystore
func (ConfigX509KeyStore) CreateSigningCert ¶
func (ks ConfigX509KeyStore) CreateSigningCert() (*rsa.PrivateKey, []byte, error)
CreateSigningCert creates a new signing pair
func (ConfigX509KeyStore) GetKeyPair ¶
func (ks ConfigX509KeyStore) GetKeyPair() (*rsa.PrivateKey, []byte, error)
GetKeyPair returns the rsa pair
func (ConfigX509KeyStore) SaveConfig ¶
func (ks ConfigX509KeyStore) SaveConfig(cert []byte, key *rsa.PrivateKey) error
SaveConfig stores the keystore config
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
}
SamlProvider holds the SamlProvider
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
AuthCodeURL returns the authCode URL
func (SamlProvider) SPMetadata ¶
func (p SamlProvider) SPMetadata() ([]byte, error)
SPMetadata returns RAW Metadata