. */ include_once 'Utilities.php'; class SAML2_Assertion { private $id; private $issueInstant; private $issuer; private $nameId; private $encryptedNameId; private $encryptedAttribute; private $encryptionKey; private $notBefore; private $notOnOrAfter; private $validAudiences; private $sessionNotOnOrAfter; private $sessionIndex; private $authnInstant; private $authnContextClassRef; private $authnContextDecl; private $authnContextDeclRef; private $AuthenticatingAuthority; private $attributes; private $nameFormat; private $signatureKey; private $certificates; private $signatureData; private $requiredEncAttributes; private $SubjectConfirmation; protected $wasSignedAtConstruction = FALSE; public function __construct(DOMElement $xml = NULL) { $this->id = Utilities::generateId(); $this->issueInstant = Utilities::generateTimestamp(); $this->issuer = ''; $this->authnInstant = Utilities::generateTimestamp(); $this->attributes = array(); $this->nameFormat = 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified'; $this->certificates = array(); $this->AuthenticatingAuthority = array(); $this->SubjectConfirmation = array(); //$relayState=$_SESSION['mo_saml_relaystate']; if ($xml === NULL) { return; } if($xml->localName === 'EncryptedAssertion'){ if($_POST['RelayState']=="testValidate"){ echo '
Error: Encrypted Assertions error.
Possible Cause: Your IdP is sending encrypted assertion which is not supported in free version.
Error: Missing NameID or EncryptedID in SAML Response
Please contact your administrator and report the following error:
Possible Cause: NameID not found in SAML Response subject