You are here

public function SAML2_Assertion::getNameId in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7

Retrieve the NameId of the subject in the assertion.

The returned NameId is in the format used by Utilities::addNameId().

Return value

array|NULL The name identifier of the assertion.

Throws

Exception

See also

Utilities::addNameId()

File

includes/Assertion.php, line 475

Class

SAML2_Assertion

Code

public function getNameId() {
  if ($this->encryptedNameId !== NULL) {
    throw new Exception('Attempted to retrieve encrypted NameID without decrypting it first.');
  }
  return $this->nameId;
}