Skip to content
Closed
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
15 changes: 11 additions & 4 deletions service_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,10 +635,17 @@ func (sp *ServiceProvider) validateAssertion(assertion *Assertion, possibleReque
}
for _, subjectConfirmation := range assertion.Subject.SubjectConfirmations {
requestIDvalid := false
for _, possibleRequestID := range possibleRequestIDs {
if subjectConfirmation.SubjectConfirmationData.InResponseTo == possibleRequestID {
requestIDvalid = true
break
// If it is an IDP Initiated Flow,
// then inResponseTo will not exist in the SubjectConfirmationData. And hence,
// in this case we are marking requestIDvalid as true by default.
if sp.AllowIDPInitiated {
requestIDvalid = true
} else {
for _, possibleRequestID := range possibleRequestIDs {
if subjectConfirmation.SubjectConfirmationData.InResponseTo == possibleRequestID {
requestIDvalid = true
break
}
}
}
if !requestIDvalid {
Expand Down