Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Add support for Signature inside of Assertion block #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion authnresponse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down
1 change: 1 addition & 0 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down