Documentation
¶
Index ¶
- type Config
- type IdentityProvider
- func (b *IdentityProvider) Authenticate(r *requests.Request) error
- func (b *IdentityProvider) Configure() error
- func (b *IdentityProvider) Configured() bool
- func (b *IdentityProvider) GetConfig() map[string]interface{}
- func (b *IdentityProvider) GetDriver() string
- func (b *IdentityProvider) GetIdentityTokenCookieName() string
- func (b *IdentityProvider) GetKind() string
- func (b *IdentityProvider) GetLoginIcon() *icons.LoginIcon
- func (b *IdentityProvider) GetLogoutURL() string
- func (b *IdentityProvider) GetName() string
- func (b *IdentityProvider) GetRealm() string
- func (b *IdentityProvider) Request(op operator.Type, r *requests.Request) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Name is the unique name associated with the IdentityProvider.
Name string `json:"name,omitempty" xml:"name,omitempty" yaml:"name,omitempty"`
// Realm the authentication realm associated with the IdentityProvider.
Realm string `json:"realm,omitempty" xml:"realm,omitempty" yaml:"realm,omitempty"`
// Driver is the name of the driver associated with the IdentityProvider, e.g. azure.
Driver string `json:"driver,omitempty" xml:"driver,omitempty" yaml:"driver,omitempty"`
// IdpMetadataLocation is the path to the Identity Provider metadata.
IdpMetadataLocation string `json:"idp_metadata_location,omitempty" xml:"idp_metadata_location,omitempty" yaml:"idp_metadata_location,omitempty"`
// IdpSignCertLocation is the path to the Identity Provider signing certificate.
IdpSignCertLocation string `json:"idp_sign_cert_location,omitempty" xml:"idp_sign_cert_location,omitempty" yaml:"idp_sign_cert_location,omitempty"`
// IdpLoginURL is the SAML authentication endpoint with the Identity Provider.
IdpLoginURL string `json:"idp_login_url,omitempty" xml:"idp_login_url,omitempty" yaml:"idp_login_url,omitempty"`
// TenantID is the tenant ID associated with the IdentityProvider.
TenantID string `json:"tenant_id,omitempty" xml:"tenant_id,omitempty" yaml:"tenant_id,omitempty"`
// ApplicationID is the application ID associated with the IdentityProvider.
ApplicationID string `json:"application_id,omitempty" xml:"application_id,omitempty" yaml:"application_id,omitempty"`
// ApplicationName is the application name associated with the IdentityProvider.
ApplicationName string `json:"application_name,omitempty" xml:"application_name,omitempty" yaml:"application_name,omitempty"`
// EntityID is the "Identifier (Entity ID)" an administrator
// specifies in "Set up Single Sign-On with SAML" in Azure AD
// Enterprise Applications.
EntityID string `json:"entity_id,omitempty" xml:"entity_id,omitempty" yaml:"entity_id,omitempty"`
// AssertionConsumerServiceURLs is the list of URLs server instance is listening
// on. These URLs are known as SP Assertion Consumer Service endpoints. For
// example, users may access a website via http://app.domain.local. At the
// same time the users may access it by IP, e.g. http://10.10.10.10. or
// by name, i.e. app. Each of the URLs is a separate endpoint.
AssertionConsumerServiceURLs []string `json:"acs_urls,omitempty" xml:"acs_urls,omitempty" yaml:"acs_urls,omitempty"`
TLSInsecureSkipVerify bool `json:"tls_insecure_skip_verify,omitempty" xml:"tls_insecure_skip_verify,omitempty" yaml:"tls_insecure_skip_verify,omitempty"`
// LoginIcon is the UI login icon attributes.
LoginIcon *icons.LoginIcon `json:"login_icon,omitempty" xml:"login_icon,omitempty" yaml:"login_icon,omitempty"`
}
Config holds the configuration for the IdentityProvider.
type IdentityProvider ¶
type IdentityProvider struct {
// contains filtered or unexported fields
}
IdentityProvider represents SAML-based identity provider.
func NewIdentityProvider ¶
func NewIdentityProvider(cfg *Config, logger *zap.Logger) (*IdentityProvider, error)
NewIdentityProvider return an instance of IdentityProvider.
func (*IdentityProvider) Authenticate ¶
func (b *IdentityProvider) Authenticate(r *requests.Request) error
Authenticate performs authentication.
func (*IdentityProvider) Configure ¶
func (b *IdentityProvider) Configure() error
Configure configures IdentityProvider.
func (*IdentityProvider) Configured ¶
func (b *IdentityProvider) Configured() bool
Configured returns true if the identity provider was configured.
func (*IdentityProvider) GetConfig ¶
func (b *IdentityProvider) GetConfig() map[string]interface{}
GetConfig returns IdentityProvider configuration.
func (*IdentityProvider) GetDriver ¶
func (b *IdentityProvider) GetDriver() string
GetDriver returns the name of the driver associated with the provider.
func (*IdentityProvider) GetIdentityTokenCookieName ¶
func (b *IdentityProvider) GetIdentityTokenCookieName() string
GetIdentityTokenCookieName returns the name of the identity token cookie associated with the provider.
func (*IdentityProvider) GetKind ¶
func (b *IdentityProvider) GetKind() string
GetKind returns the authentication method associated with this identity provider.
func (*IdentityProvider) GetLoginIcon ¶
func (b *IdentityProvider) GetLoginIcon() *icons.LoginIcon
GetLoginIcon returns the instance of the icon associated with the provider.
func (*IdentityProvider) GetLogoutURL ¶
func (b *IdentityProvider) GetLogoutURL() string
GetLogoutURL returns the logout URL associated with the provider.
func (*IdentityProvider) GetName ¶
func (b *IdentityProvider) GetName() string
GetName return the name associated with this identity provider.
func (*IdentityProvider) GetRealm ¶
func (b *IdentityProvider) GetRealm() string
GetRealm return authentication realm.