Documentation ¶
Index ¶
- type AffiliationDescriptor
- type Attribute
- type AttributeAuthorityDescriptor
- type AttributeConsumingService
- type AttributeValue
- type AuthnAuthorityDescriptor
- type ContactPerson
- type ContactType
- type DescriptorCommon
- type Duration
- type EncryptionMethod
- type Endpoint
- type EntitiesDescriptor
- type EntityDescriptor
- type EntityDescriptorIDPSSO
- type EntityDescriptorSPSSO
- type IDPSSODescriptor
- type IndexedEndpoint
- type KeyDescriptor
- type KeyInfo
- type KeyType
- type Localized
- type NameID
- type Organization
- type PDPDescriptor
- type ProtocolSupportEnumeration
- type RequestedAttribute
- type RoleDescriptor
- type SPSSODescriptor
- type SSODescriptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AffiliationDescriptor ¶
type AffiliationDescriptor struct{}
AffiliationDescriptor represents a group of other entities, such as related service providers that share a persistent NameID.
type Attribute ¶
type Attribute struct { FriendlyName string `xml:",attr"` Name string `xml:",attr"` NameFormat string `xml:",attr"` AttributeValue []AttributeValue }
TODO: CORE This needs to be part of core?
type AttributeAuthorityDescriptor ¶
type AttributeAuthorityDescriptor struct{}
AttributeAuthorityDescriptor is a compatibiity requirement for supporting legacy or other SPs that rely on queries for attributes.
type AttributeConsumingService ¶
type AttributeConsumingService struct { Index int `xml:",attr"` IsDefault bool `xml:"isDefault,attr"` ServiceName []Localized ServiceDescription []Localized RequestedAttribute []RequestedAttribute }
AttributeConsumingService (ACS) is the location where an IdP will eventually send the user at the SP. See 2.4.4.1 http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf
type AttributeValue ¶
type AttributeValue struct { Type string `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr"` Value string `xml:",chardata"` NameID *NameID }
TODO: CORE
type AuthnAuthorityDescriptor ¶
type AuthnAuthorityDescriptor struct { RoleDescriptor AuthnQueryService []Endpoint AssertionIDRequestService []Endpoint NameIDFormats []core.NameIDFormat }
AuthnAuthorityDescriptor ... ??? TODO See 2.4.5 http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf
type ContactPerson ¶
type ContactPerson struct { ContactType ContactType `xml:",attr"` Extensions []*etree.Element Company string GivenName string SurName string EmailAddress []string TelephoneNumber []string }
ContactPerson specifies basic contact information about a person responsible in some capacity for a SAML entity or role. See 2.3.2.2 http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf
type ContactType ¶
type ContactType string
const ( ContactTypeTechnical ContactType = "technical" ContactTypeSupport ContactType = "support" ContactTypeAdministrative ContactType = "administrative" ContactTypeBilling ContactType = "billing" ContactTypeOther ContactType = "other" )
type DescriptorCommon ¶
type DescriptorCommon struct { ID string `xml:",attr,omitempty"` ValidUntil *time.Time `xml:"validUntil,attr,omitempty"` CacheDuration *Duration `xml:"cacheDuration,attr,omitempty"` Signature *dsig.Signature }
DescriptorCommon defines common fields used in Entity- and EntitiesDescriptor.
type Duration ¶
Duration is a time.Duration that uses the xsd:duration format for text marshalling and unmarshalling.
func (Duration) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface.
func (*Duration) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface.
type EncryptionMethod ¶
type EncryptionMethod struct {
Algorithm string `xml:"Algorithm,attr"`
}
EncyrptionMethod describes the encryption algorithm applied to the cipher data. See https://www.w3.org/TR/2002/REC-xmlenc-core-20021210/Overview.html#sec-EncryptionMethod
type Endpoint ¶
type Endpoint struct { Binding core.ServiceBinding `xml:",attr"` Location string `xml:",attr"` ResponseLocation string `xml:",attr,omitempty"` }
EndpointType describes a SAML protocol binding endpoint at which a SAML entity can be sent protocol messages. See 2.2.2 http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf
type EntitiesDescriptor ¶
type EntitiesDescriptor struct { DescriptorCommon Name string EntitiesDescriptor []*EntitiesDescriptor EntityDescriptor []*EntityDescriptor }
EntitiesDescriptor is a container that wraps one or more elements of EntityDiscriptor. See 2.3.1 in http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf
type EntityDescriptor ¶
type EntityDescriptor struct { DescriptorCommon EntityID string `xml:"entityID,attr"` AffiliationDescriptor *AffiliationDescriptor Organization *Organization ContactPerson *ContactPerson AdditionalMetadataLocation []string }
EntityDescriptor represents a system entity (IdP or SP) in metadata. See 2.3.2 in http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf
type EntityDescriptorIDPSSO ¶
type EntityDescriptorIDPSSO struct { EntityDescriptor IDPSSODescriptor []*IDPSSODescriptor }
EntityDescriptorIDPSSO is an EntityDescriptor that accommodates the IDPSSODescriptor as descriptor field only.
func (*EntityDescriptorIDPSSO) GetLocationForBinding ¶
func (e *EntityDescriptorIDPSSO) GetLocationForBinding(b core.ServiceBinding) (string, bool)
type EntityDescriptorSPSSO ¶
type EntityDescriptorSPSSO struct { XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata EntityDescriptor"` EntityDescriptor SPSSODescriptor []*SPSSODescriptor }
EntityDescriptorSPSSO defines an EntityDescriptor type that can accommodate an SPSSODescriptor. This type can be usued specifically to describe SPSSO profiles.
type IDPSSODescriptor ¶
type IDPSSODescriptor struct { XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata IDPSSODescriptor"` SSODescriptor WantAuthnRequestsSigned bool `xml:",attr"` SingleSignOnService []Endpoint NameIDMappingService []Endpoint // TODO test missing! AssertionIDRequestService []Endpoint // TODO test missing! AttributeProfile []string // TODO test missing! Attribute []Attribute }
IDPSSODescriptor contains profiles specific to identity providers supporting SSO. It extends the SSODescriptor type. See 2.4.3 http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf
type IndexedEndpoint ¶
type IndexedEndpoint struct { Endpoint Index int `xml:"index,attr"` IsDefault bool `xml:"isDefault,attr,omitempty"` }
IndexedEndpointType extends EndpointType with a pair of attributes to permit the indexing of otherwise identical endpoints so that they can be referenced by protocol messages. See 2.2.3 http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf
type KeyDescriptor ¶
type KeyDescriptor struct { Use KeyType `xml:"use,attr"` KeyInfo KeyInfo EncryptionMethod []EncryptionMethod }
KeyDescriptor provides information about the cryptographic key(s) that an entity uses to sign data or receive encrypted keys, along with additional cryptographic details. See 2.4.1.1 http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf
type KeyInfo ¶
KeyInfo directly or indireclty identifies a key. It defines the usage of the XML Signature <ds:KeyInfo> element. See https://www.w3.org/TR/xmldsig-core1/#sec-KeyInfo
type KeyType ¶
type KeyType string
KeyType defines what the key is used for. Possible values are "encryption" and "signing". See 2.4.1.1 http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf
type Localized ¶
type Localized struct { Lang string `xml:"http://www.w3.org/XML/1998/namespace lang,attr"` Value string `xml:",chardata"` }
Localized is used to represent the SAML types: - localizedName - localizedURI See 2.2.4 & 2.2.5 http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf
type NameID ¶
type NameID struct { NameQualifier string `xml:",attr"` SPNameQualifier string `xml:",attr"` Format string `xml:",attr"` SPProvidedID string `xml:",attr"` Value string `xml:",chardata"` }
TODO: CORE
type Organization ¶
type Organization struct { Extensions []*etree.Element OrganizationName []Localized OrganizationDisplayName []Localized OrganizationURL []Localized }
Organization specifies basic information about an organization responsible for a SAML entity or role. See 2.3.2.1 http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf
type PDPDescriptor ¶
type PDPDescriptor struct{}
type ProtocolSupportEnumeration ¶
type ProtocolSupportEnumeration string
const (
ProtocolSupportEnumerationProtocol ProtocolSupportEnumeration = "urn:oasis:names:tc:SAML:2.0:protocol"
)
type RequestedAttribute ¶
RequestedAttribute specifies a service providers interest in a specific SAML attribute, including specific values. See 2.4.4.2 http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf
type RoleDescriptor ¶
type RoleDescriptor struct { DescriptorCommon ProtocolSupportEnumeration ProtocolSupportEnumeration `xml:"protocolSupportEnumeration,attr,omitempty"` ErrorURL string `xml:"errorURL,attr,omitempty"` KeyDescriptor []KeyDescriptor Organization *Organization ContactPerson []ContactPerson }
RoleDescriptor is an abstract extension point that contains common descriptive information intended to provide processing commonality across different roles. See 2.4.1 http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf
type SPSSODescriptor ¶
type SPSSODescriptor struct { XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata SPSSODescriptor"` SSODescriptor AuthnRequestsSigned bool `xml:",attr"` WantAssertionsSigned bool `xml:",attr"` AssertionConsumerService []IndexedEndpoint AttributeConsumingService []*AttributeConsumingService Attribute []Attribute }
SPSSODescriptor contains profiles specific to service providers. It extends the SSODescriptor type. See 2.4.4 http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf
type SSODescriptor ¶
type SSODescriptor struct { RoleDescriptor ArtifactResolutionService []IndexedEndpoint SingleLogoutService []Endpoint ManageNameIDService []Endpoint NameIDFormat []core.NameIDFormat }
SSODescriptor is the common base type for concrete types such as IDPSSODescriptor and SPSSODescriptor. See 2.4.2 http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf