This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
simplesamlphp/modules/adfs/lib/XMLSecurityDSig.php

33 lines
883 B
PHP

<?php
/**
* This class should be considered a temporary workaround to
* solve the lack of custom formatting in XMLSecurityDSig
* (xmlseclibs). It should be possible to either configure
* the original class to avoid formatting, or to use a custom
* template for the signature.
*
* @todo Move this functionality to xmlseclibs.
*
* @author Daniel Tsosie
* @package simpleSAMLphp
* @version $Id$
*/
class sspmod_adfs_XMLSecurityDSig extends XMLSecurityDSig {
function __construct($metaxml) {
$sigdoc = new DOMDocument();
$template = '';
if (strpos("\n", $metaxml) === FALSE) {
foreach (explode("\n", self::template) as $line)
$template .= trim($line);
} else {
$template = self::template;
}
$sigdoc->loadXML($template);
$this->sigNode = $sigdoc->documentElement;
}
}