runff 1.0 commit

This commit is contained in:
rock64
2019-04-29 16:09:00 +02:00
commit f1567f989b
1268 changed files with 98652 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
<?php
/**
* The Shibboleth 1.3 Authentication Request. Not part of SAML 1.1,
* but an extension using query paramters no XML.
*
* @author Andreas Åkre Solberg, UNINETT AS. <andreas.solberg@uninett.no>
* @package SimpleSAMLphp
*/
namespace SimpleSAML\XML\Shib13;
class AuthnRequest
{
private $issuer = null;
private $relayState = null;
public function setRelayState($relayState)
{
$this->relayState = $relayState;
}
public function getRelayState()
{
return $this->relayState;
}
public function setIssuer($issuer)
{
$this->issuer = $issuer;
}
public function getIssuer()
{
return $this->issuer;
}
public function createRedirect($destination, $shire)
{
$metadata = \SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
$idpmetadata = $metadata->getMetaDataConfig($destination, 'shib13-idp-remote');
$desturl = $idpmetadata->getDefaultEndpoint('SingleSignOnService', array('urn:mace:shibboleth:1.0:profiles:AuthnRequest'));
$desturl = $desturl['Location'];
$target = $this->getRelayState();
$url = $desturl . '?' .
'providerId=' . urlencode($this->getIssuer()) .
'&shire=' . urlencode($shire) .
(isset($target) ? '&target=' . urlencode($target) : '');
return $url;
}
}