Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
vgrem committed Aug 2, 2018
2 parents e653e7b + 8a51ae4 commit 53e8586
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/Runtime/Auth/SamlTokenProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,11 @@ protected function processSecurityTokenResponse($response)
}

if ($xpath->query("//S:Fault")->length > 0) {
$nodeErr = $xpath->query("//S:Fault/S:Detail/psf:error/psf:internalerror/psf:text")->item(0);
throw new \Exception($nodeErr->nodeValue);
}

if ($xpath->query("//S:Fault")->length > 0) {
$nodeErr = $xpath->query("//S:Fault/S:Detail/psf:error/psf:internalerror/psf:text")->item(0);
throw new \Exception($nodeErr->nodeValue);
// Returning the full fault value in case any other response comes within the fault node.
throw new \RuntimeException($xpath->query("//S:Fault")->item(0)->nodeValue);
}

throw new \RuntimeException('Error trying to get a token, check your URL or credentials');

}

/**
Expand Down

0 comments on commit 53e8586

Please sign in to comment.