You are here

public static function Utilities::parseNameId in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7

2 calls to Utilities::parseNameId()
SAML2_Assertion::decryptNameId in includes/Assertion.php
Decrypt the NameId of the subject in the assertion.
SAML2_Assertion::parseSubject in includes/Assertion.php
Parse subject in assertion.

File

includes/Utilities.php, line 720

Class

Utilities
This file is part of miniOrange SAML plugin.

Code

public static function parseNameId(DOMElement $xml) {
  $ret = array(
    'Value' => trim($xml->textContent),
  );
  foreach (array(
    'NameQualifier',
    'SPNameQualifier',
    'Format',
  ) as $attr) {
    if ($xml
      ->hasAttribute($attr)) {
      $ret[$attr] = $xml
        ->getAttribute($attr);
    }
  }
  return $ret;
}