diff --git a/lib/SimpleSAML/XHTML/IdPDisco.php b/lib/SimpleSAML/XHTML/IdPDisco.php index bd9e13484e2279709131f43646c623ef2642bac9..57c968e844da90460d84bb662d8fddc891e43d40 100644 --- a/lib/SimpleSAML/XHTML/IdPDisco.php +++ b/lib/SimpleSAML/XHTML/IdPDisco.php @@ -20,6 +20,9 @@ class SimpleSAML_XHTML_IdPDisco { 'shib13' => array( 'metadata' => 'shib13-idp-remote', ), + 'wsfed' => array( + 'metadata' => 'wsfed-idp-remote', + ), ); diff --git a/www/wsfed/sp/idpdisco.php b/www/wsfed/sp/idpdisco.php new file mode 100644 index 0000000000000000000000000000000000000000..ab83d6d6ed3143a5da0a25be57005baf172306db --- /dev/null +++ b/www/wsfed/sp/idpdisco.php @@ -0,0 +1,21 @@ +<?php + +require_once('../../_include.php'); + +$session = SimpleSAML_Session::getInstance(); + +try { + $discoHandler = new SimpleSAML_XHTML_IdPDisco('wsfed'); +} catch (Exception $exception) { + /* An error here should be caused by invalid query parameters. */ + SimpleSAML_Utilities::fatalError($session->getTrackID(), 'DISCOPARAMS', $exception); +} + +try { + $discoHandler->handleRequest(); +} catch(Exception $exception) { + /* An error here should be caused by metadata. */ + SimpleSAML_Utilities::fatalError($session->getTrackID(), 'METADATA', $exception); +} + +?> \ No newline at end of file diff --git a/www/wsfed/sp/initSSO.php b/www/wsfed/sp/initSSO.php index fce752e4812579b65523e2e11fa36d1fdc97d843..0e27ff448fc98e6c0e81d07295eedff33fb48476 100644 --- a/www/wsfed/sp/initSSO.php +++ b/www/wsfed/sp/initSSO.php @@ -37,9 +37,6 @@ try { if ($idpentityid == null) { - throw new Exception('IdP discovery for WS-Fed is currently unsupported.'); - /* TODO: Add idpdisco.php */ - SimpleSAML_Logger::info('WS-Fed - SP.initSSO: No chosen or default IdP, go to WSFeddisco'); SimpleSAML_Utilities::redirect('/' . $config->getBaseURL() . 'wsfed/sp/idpdisco.php', array(