You are here

public function SamlController::metadata in SAML Authentication 8

Same name and namespace in other branches
  1. 8.3 src/Controller/SamlController.php \Drupal\samlauth\Controller\SamlController::metadata()
  2. 8.2 src/Controller/SamlController.php \Drupal\samlauth\Controller\SamlController::metadata()
  3. 4.x src/Controller/SamlController.php \Drupal\samlauth\Controller\SamlController::metadata()

Displays service provider metadata XML for iDP autoconfiguration.

Return value

\Symfony\Component\HttpFoundation\Response

1 string reference to 'SamlController::metadata'
samlauth.routing.yml in ./samlauth.routing.yml
samlauth.routing.yml

File

src/Controller/SamlController.php, line 80
Contains Drupal\samlauth\Controller\SamlController.

Class

SamlController
Class SamlController.

Namespace

Drupal\samlauth\Controller

Code

public function metadata() {
  $metadata = $this->saml
    ->getMetadata();
  $response = new Response($metadata, 200);
  $response->headers
    ->set('Content-Type', 'text/xml');
  return $response;
}