From 6395d4e63cd70d4c463feb61d00b63e8d6c27499 Mon Sep 17 00:00:00 2001 From: Phu Kieu Date: Wed, 7 Dec 2016 10:52:10 -0800 Subject: [PATCH] Add support for Signature inside of Assertion block --- authnresponse.go | 2 +- types.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/authnresponse.go b/authnresponse.go index 3064412..8b7cc79 100644 --- a/authnresponse.go +++ b/authnresponse.go @@ -59,7 +59,7 @@ func (r *Response) Validate(s *ServiceProviderSettings) error { return errors.New("no Assertions") } - if len(r.Signature.SignatureValue.Value) == 0 { + if len(r.Signature.SignatureValue.Value) == 0 && len(r.Assertion.Signature.SignatureValue.Value) == 0 { return errors.New("no signature") } diff --git a/types.go b/types.go index e691c02..bc4ec39 100644 --- a/types.go +++ b/types.go @@ -203,6 +203,7 @@ type Assertion struct { SAML string `xml:"saml,attr"` IssueInstant string `xml:"IssueInstant,attr"` Issuer Issuer `xml:"Issuer"` + Signature Signature Subject Subject Conditions Conditions AttributeStatement AttributeStatement