Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 48 additions & 37 deletions pkg/provider/xml/md/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,27 +150,33 @@ type SSODescriptorType struct {
}

type IDPSSODescriptorType struct {
XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata IDPSSODescriptor"`
WantAuthnRequestsSigned string `xml:"WantAuthnRequestsSigned,attr,omitempty"`
Id string `xml:"ID,attr,omitempty"`
ValidUntil string `xml:"validUntil,attr,omitempty"`
CacheDuration string `xml:"cacheDuration,attr,omitempty"`
ProtocolSupportEnumeration AnyURIListType `xml:"protocolSupportEnumeration,attr"`
ErrorURL string `xml:"errorURL,attr,omitempty"`
SingleSignOnService []EndpointType `xml:"urn:oasis:names:tc:SAML:2.0:metadata SingleSignOnService"`
NameIDMappingService []EndpointType `xml:"urn:oasis:names:tc:SAML:2.0:metadata NameIDMappingService"`
AssertionIDRequestService []EndpointType `xml:"urn:oasis:names:tc:SAML:2.0:metadata AssertionIDRequestService"`
AttributeProfile []string `xml:"AttributeProfile"`
Attribute []*saml.AttributeType `xml:"Attribute"`
ArtifactResolutionService []IndexedEndpointType `xml:"urn:oasis:names:tc:SAML:2.0:metadata ArtifactResolutionService"`
SingleLogoutService []EndpointType `xml:"urn:oasis:names:tc:SAML:2.0:metadata SingleLogoutService"`
ManageNameIDService []EndpointType `xml:"urn:oasis:names:tc:SAML:2.0:metadata ManageNameIDService"`
NameIDFormat []string `xml:"NameIDFormat"`
Signature *xml_dsig.SignatureType `xml:"Signature"`
Extensions *ExtensionsType `xml:"Extensions"`
KeyDescriptor []KeyDescriptorType `xml:"KeyDescriptor"`
Organization *OrganizationType `xml:"Organization"`
ContactPerson []ContactType `xml:"ContactPerson"`
XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata IDPSSODescriptor"`
WantAuthnRequestsSigned string `xml:"WantAuthnRequestsSigned,attr,omitempty"`
Id string `xml:"ID,attr,omitempty"`
ValidUntil string `xml:"validUntil,attr,omitempty"`
CacheDuration string `xml:"cacheDuration,attr,omitempty"`
ProtocolSupportEnumeration AnyURIListType `xml:"protocolSupportEnumeration,attr"`
ErrorURL string `xml:"errorURL,attr,omitempty"`

// DO NOT CHANGE THE ORDER OF THESE PARAMS.
// See https://groups.oasis-open.org/higherlogic/ws/public/download/51890/SAML%20MD%20simplified%20overview.pdf/latest chapter 2.10
Extensions *ExtensionsType `xml:"Extensions"`
KeyDescriptor []KeyDescriptorType `xml:"KeyDescriptor"`
ArtifactResolutionService []IndexedEndpointType `xml:"urn:oasis:names:tc:SAML:2.0:metadata ArtifactResolutionService"`
SingleLogoutService []EndpointType `xml:"urn:oasis:names:tc:SAML:2.0:metadata SingleLogoutService"`
NameIDFormat []string `xml:"NameIDFormat"`
SingleSignOnService []EndpointType `xml:"urn:oasis:names:tc:SAML:2.0:metadata SingleSignOnService"`

NameIDMappingService []EndpointType `xml:"urn:oasis:names:tc:SAML:2.0:metadata NameIDMappingService"`
AssertionIDRequestService []EndpointType `xml:"urn:oasis:names:tc:SAML:2.0:metadata AssertionIDRequestService"`

// AttributeProfile MUST be before Attribute
AttributeProfile []string `xml:"AttributeProfile"`
Attribute []*saml.AttributeType `xml:"Attribute"`
ManageNameIDService []EndpointType `xml:"urn:oasis:names:tc:SAML:2.0:metadata ManageNameIDService"`
Signature *xml_dsig.SignatureType `xml:"Signature"`
Organization *OrganizationType `xml:"Organization"`
ContactPerson []ContactType `xml:"ContactPerson"`
//InnerXml string `xml:",innerxml"`
}

Expand Down Expand Up @@ -254,22 +260,27 @@ type PDPDescriptorType struct {
}

type AttributeAuthorityDescriptorType struct {
XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata AttributeAuthorityDescriptor"`
Id string `xml:"ID,attr,omitempty"`
ValidUntil string `xml:"validUntil,attr,omitempty"`
CacheDuration string `xml:"cacheDuration,attr,omitempty"`
ProtocolSupportEnumeration AnyURIListType `xml:"protocolSupportEnumeration,attr"`
ErrorURL string `xml:"errorURL,attr,omitempty"`
AttributeService []EndpointType `xml:"urn:oasis:names:tc:SAML:2.0:metadata AttributeService"`
AssertionIDRequestService []EndpointType `xml:"urn:oasis:names:tc:SAML:2.0:metadata AssertionIDRequestService"`
NameIDFormat []string `xml:"NameIDFormat"`
AttributeProfile []string `xml:"AttributeProfile"`
Attribute []*saml.AttributeType `xml:"Attribute"`
Signature *xml_dsig.SignatureType `xml:"Signature"`
Extensions *ExtensionsType `xml:"Extensions"`
KeyDescriptor []KeyDescriptorType `xml:"KeyDescriptor"`
Organization *OrganizationType `xml:"Organization"`
ContactPerson []ContactType `xml:"ContactPerson"`
XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata AttributeAuthorityDescriptor"`
Id string `xml:"ID,attr,omitempty"`
ValidUntil string `xml:"validUntil,attr,omitempty"`
CacheDuration string `xml:"cacheDuration,attr,omitempty"`
ProtocolSupportEnumeration AnyURIListType `xml:"protocolSupportEnumeration,attr"`
ErrorURL string `xml:"errorURL,attr,omitempty"`

// DO NOT CHANGE THE ORDER OF THESE PARAMS.
// See https://groups.oasis-open.org/higherlogic/ws/public/download/51890/SAML%20MD%20simplified%20overview.pdf/latest chapter 2.1
KeyDescriptor []KeyDescriptorType `xml:"KeyDescriptor"`
AttributeService []EndpointType `xml:"urn:oasis:names:tc:SAML:2.0:metadata AttributeService"`
NameIDFormat []string `xml:"NameIDFormat"`

AssertionIDRequestService []EndpointType `xml:"urn:oasis:names:tc:SAML:2.0:metadata AssertionIDRequestService"`
// AttributeProfile MUST be before Attribute
AttributeProfile []string `xml:"AttributeProfile"`
Attribute []*saml.AttributeType `xml:"Attribute"`
Signature *xml_dsig.SignatureType `xml:"Signature"`
Extensions *ExtensionsType `xml:"Extensions"`
Organization *OrganizationType `xml:"Organization"`
ContactPerson []ContactType `xml:"ContactPerson"`
//InnerXml string `xml:",innerxml"`
}

Expand Down
Loading