Skip to content

Commit 23b0b0c

Browse files
Merge pull request #35 from asenyshyn/master
removed IDPSSODescriptor from SP metadata
2 parents 0130619 + 9a79382 commit 23b0b0c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

saml.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (sp *SAMLServiceProvider) Metadata() (*types.EntityDescriptor, error) {
7979
return &types.EntityDescriptor{
8080
ValidUntil: time.Now().UTC().Add(time.Hour * 24 * 7), // 7 days
8181
EntityID: sp.ServiceProviderIssuer,
82-
SPSSODescriptor: types.SPSSODescriptor{
82+
SPSSODescriptor: &types.SPSSODescriptor{
8383
AuthnRequestsSigned: sp.SignAuthnRequests,
8484
WantAssertionsSigned: !sp.SkipSignatureValidation,
8585
ProtocolSupportEnumeration: SAMLProtocolNamespace,

types/metadata.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ type EntityDescriptor struct {
1111
XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata EntityDescriptor"`
1212
ValidUntil time.Time `xml:"validUntil,attr"`
1313
// SAML 2.0 8.3.6 Entity Identifier could be used to represent issuer
14-
EntityID string `xml:"entityID,attr"`
15-
SPSSODescriptor SPSSODescriptor `xml:"SPSSODescriptor"`
16-
IDPSSODescriptor IDPSSODescriptor `xml:"IDPSSODescriptor"`
14+
EntityID string `xml:"entityID,attr"`
15+
SPSSODescriptor *SPSSODescriptor `xml:"SPSSODescriptor,omitempty"`
16+
IDPSSODescriptor *IDPSSODescriptor `xml:"IDPSSODescriptor,omitempty"`
1717
}
1818

1919
type Endpoint struct {

0 commit comments

Comments
 (0)