saml

package
v1.0.27 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

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"`

	IconName  string `json:"icon_name,omitempty" xml:"icon_name,omitempty" yaml:"icon_name,omitempty"`
	IconText  string `json:"icon_text,omitempty" xml:"icon_text,omitempty" yaml:"icon_text,omitempty"`
	IconColor string `json:"icon_color,omitempty" xml:"icon_color,omitempty" yaml:"icon_color,omitempty"`
}

Config holds the configuration for the IdentityProvider.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate validates identity store configuration.

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) GetIconColor added in v1.0.24

func (b *IdentityProvider) GetIconColor() string

GetIconColor returns the color of the icon associated with the provider.

func (*IdentityProvider) GetIconName added in v1.0.24

func (b *IdentityProvider) GetIconName() string

GetIconName returns the name of the icon associated with the provider.

func (*IdentityProvider) GetIconText added in v1.0.24

func (b *IdentityProvider) GetIconText() string

GetIconText returns the text of the icon associated with the provider.

func (*IdentityProvider) GetKind

func (b *IdentityProvider) GetKind() string

GetKind returns the authentication method associated with this identity 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.

func (*IdentityProvider) Request

func (b *IdentityProvider) Request(op operator.Type, r *requests.Request) error

Request performs the requested identity provider operation.

Jump to

Keyboard shortcuts

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