You are here

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

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

src/SAML2_Assertion.php, line 430

Class

SAML2_Assertion

Namespace

Drupal\miniorange_saml

Code

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