You are here

public static function Utilities::processResponse in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7

1 call to Utilities::processResponse()
MiniOrangeAcs::processSamlResponse in includes/Acs.php
The function processSamlResponse.

File

includes/Utilities.php, line 902

Class

Utilities
This file is part of miniOrange SAML plugin.

Code

public static function processResponse($currentURL, $certFingerprint, $signatureData, SAML2_Response $response, $relayState) {

  //assert('is_string($currentURL)');

  //assert('is_string($certFingerprint)');
  $ResCert = $signatureData['Certificates'][0];
  variable_set('miniorange_saml_expected_certificate', $ResCert);

  /* Validate Response-element destination. */
  $msgDestination = $response
    ->getDestination();
  if ($msgDestination !== NULL && $msgDestination !== $currentURL) {
    echo sprintf('Destination in response doesn\'t match the current URL. Destination is "' . $msgDestination . '", current URL is "' . $currentURL . '".');
    exit;
  }
  $responseSigned = self::checkSign($certFingerprint, $signatureData, $relayState, $ResCert);

  /* Returning boolean $responseSigned */
  return $responseSigned;
}