You are here

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

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

File

src/Utilities.php, line 483

Class

Utilities
This file is part of miniOrange SAML plugin.

Namespace

Drupal\miniorange_saml

Code

public static function processResponse($currentURL, $certFingerprint, $signatureData, SAML2_Response $response) {
  $ResCert = $signatureData['Certificates'][0];

  /* 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 "' . XSS::filter($msgDestination) . '", current URL is "' . XSS::filter($currentURL) . '".');

    // exit;
  }
  $responseSigned = self::checkSign($certFingerprint, $signatureData, $ResCert);

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