You are here

public function ShibbolethAuthenticationProvider::handleException in Shibboleth Authentication 8.4

File

src/Authentication/Provider/ShibbolethAuthenticationProvider.php, line 75
Contains Drupal\shib_auth\Authentication\Provider\ShibbolethAuthenticationProvider.

Class

ShibbolethAuthenticationProvider
Class ShibbolethAuthenticationProvider.

Namespace

Drupal\shib_auth\Authentication\Provider

Code

public function handleException(GetResponseForExceptionEvent $event) {
  $exception = $event
    ->getException();
  if ($exception instanceof AccessDeniedHttpException) {
    $event
      ->setException(new UnauthorizedHttpException('Invalid consumer origin.', $exception));
    return TRUE;
  }
  return FALSE;
}