You are here

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

Retrieve the authentication method used to authenticate the user.

This will return NULL if no authentication statement was included in the assertion.

Note that this returns either the AuthnContextClassRef or the AuthnConextDeclRef, whose definition overlaps but is slightly different (consult the specification for more information). This was done to work around an old bug of Shibboleth ( https://bugs.internet2.edu/jira/browse/SIDP-187 ). Should no longer be required, please use either getAuthnConextClassRef or getAuthnContextDeclRef.

Return value

string|NULL The authentication method.

Deprecated

use getAuthnContextClassRef

File

includes/Assertion.php, line 795

Class

SAML2_Assertion

Code

public function getAuthnContext() {
  if (!empty($this->authnContextClassRef)) {
    return $this->authnContextClassRef;
  }
  if (!empty($this->authnContextDeclRef)) {
    return $this->authnContextDeclRef;
  }
  return NULL;
}