Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntityDescriptor ¶
type EntityDescriptor struct { XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata EntityDescriptor"` ID string `xml:",attr,omitempty"` EntityID string `xml:"entityID,attr"` }
EntityDescriptor TODO.
type IDPEntityDescriptor ¶
type IDPEntityDescriptor struct { *EntityDescriptor IDPSSODescriptor *IDPSSODescriptor }
IDPEntityDescriptor TODO.
type IDPSSODescriptor ¶
type IDPSSODescriptor struct { XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata IDPSSODescriptor"` WantAuthnRequestsSigned bool `xml:",attr"` ProtocolSupportEnumeration string `xml:"protocolSupportEnumeration,attr"` KeyDescriptor KeyDescriptor NameIDFormat string `xml:"NameIDFormat"` SingleSignOnService []SingleSignOnService }
IDPSSODescriptor TODO.
type KeyDescriptor ¶
type KeyDescriptor struct { XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata KeyDescriptor"` Use string `xml:"use,attr,omitempty"` KeyInfo KeyInfo }
KeyDescriptor TODO.
type KeyInfo ¶
type KeyInfo struct { XMLName xml.Name `xml:"http://www.w3.org/2000/09/xmldsig# KeyInfo"` X509Data *X509Data }
KeyInfo TODO.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider represents sso provider.
func (*Provider) Configured ¶
Configured returns true if the sso provider was configured.
func (*Provider) GetMetadata ¶
GetMetadata returns the contents of metadata.xml.
type Request ¶
type Request struct { ProviderName string `json:"provider_name,omitempty" xml:"provider_name,omitempty" yaml:"provider_name,omitempty"` Kind RequestKind `json:"kind,omitempty" xml:"kind,omitempty" yaml:"kind,omitempty"` Params string `json:"params,omitempty" xml:"params,omitempty" yaml:"params,omitempty"` }
Request represents sso provider request.
type RequestKind ¶
type RequestKind int
RequestKind represents the type of SSO provider request.
const ( // UnknownRequest represents unspecified request type. UnknownRequest RequestKind = iota // MetadataRequest represents metadata request type. MetadataRequest // AssumeRoleRequest represents role assumption request type. AssumeRoleRequest // MenuRequest represents role selection request type. MenuRequest )
type SingleSignOnProvider ¶
type SingleSignOnProvider interface { GetName() string GetDriver() string GetConfig() map[string]interface{} Configure() error Configured() bool GetMetadata() ([]byte, error) }
SingleSignOnProvider represents sso provider interface.
func NewSingleSignOnProvider ¶
func NewSingleSignOnProvider(cfg *SingleSignOnProviderConfig, logger *zap.Logger) (SingleSignOnProvider, error)
NewSingleSignOnProvider returns SingleSignOnProvider instance.
type SingleSignOnProviderConfig ¶
type SingleSignOnProviderConfig struct { Name string `json:"name,omitempty" xml:"name,omitempty" yaml:"name,omitempty"` Driver string `json:"driver,omitempty" xml:"driver,omitempty" yaml:"driver,omitempty"` EntityID string `json:"entity_id,omitempty" xml:"entity_id,omitempty" yaml:"entity_id,omitempty"` Locations []string `json:"locations,omitempty" xml:"locations,omitempty" yaml:"locations,omitempty"` PrivateKeyPath string `json:"private_key_path,omitempty" xml:"private_key_path,omitempty" yaml:"private_key_path,omitempty"` CertPath string `json:"cert_path,omitempty" xml:"cert_path,omitempty" yaml:"cert_path,omitempty"` }
SingleSignOnProviderConfig represents an identity provider configuration.
func NewSingleSignOnProviderConfig ¶
func NewSingleSignOnProviderConfig(data map[string]interface{}) (*SingleSignOnProviderConfig, error)
NewSingleSignOnProviderConfig returns SingleSignOnProviderConfig instance.
func (*SingleSignOnProviderConfig) Validate ¶
func (cfg *SingleSignOnProviderConfig) Validate() error
Validate validates identity provider config.
type SingleSignOnService ¶
type SingleSignOnService struct { XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata SingleSignOnService"` Service }
SingleSignOnService TODO.