Conditions | 4 |
Paths | 10 |
Total Lines | 22 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function acsAction(Request $request) |
||
|
|||
24 | { |
||
25 | libxml_disable_entity_loader(true); |
||
26 | try { |
||
27 | $httpPostBinding = new HTTPPost(); |
||
28 | $message = $httpPostBinding->receive(); |
||
29 | } catch (Exception $e1) { |
||
30 | try { |
||
31 | $httpRedirectBinding = new HTTPRedirect(); |
||
32 | $message = $httpRedirectBinding->receive(); |
||
33 | } catch (Exception $e2) { |
||
34 | throw new RuntimeException('Unable to retrieve SAML message?', 1, $e1); |
||
35 | } |
||
36 | } |
||
37 | |||
38 | if (!$message instanceof SAMLResponse) { |
||
39 | throw new RuntimeException(sprintf('Unrecognized message type received: "%s"', get_class($message))); |
||
40 | } |
||
41 | |||
42 | $xml = base64_decode($request->get('SAMLResponse')); |
||
43 | return XMLResponse::create($xml); |
||
44 | } |
||
45 | |||
47 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.