in pkg/provider/adfs/adfs.go [184:217]
func checkResponse(doc *goquery.Document) (AuthResponseType, string, error) {
samlAssertion := ""
responseType := UNKNOWN
doc.Find("input").Each(func(i int, s *goquery.Selection) {
name, ok := s.Attr("name")
if !ok {
log.Fatalf("unable to locate IDP authentication form submit URL")
}
if name == "SAMLResponse" {
val, ok := s.Attr("value")
if !ok {
log.Fatalf("unable to locate saml assertion value")
}
samlAssertion = val
responseType = SAML_RESPONSE
}
if name == "AuthMethod" {
val, _ := s.Attr("value")
switch val {
case "VIPAuthenticationProviderWindowsAccountName", "VIPAuthenticationProviderUPN", "Defender AD FS Adapter":
responseType = MFA_PROMPT
case "AzureMfaAuthentication":
responseType = AZURE_MFA_WAIT
case "AzureMfaServerAuthentication":
responseType = AZURE_MFA_SERVER_WAIT
}
}
if name == "VerificationCode" {
responseType = MFA_PROMPT
}
})
return responseType, samlAssertion, nil
}