You are here

public function Idp::setAuthnContextClassRef in SAML Service Provider 4.x

Same name and namespace in other branches
  1. 8.3 src/Entity/Idp.php \Drupal\saml_sp\Entity\Idp::setAuthnContextClassRef()
  2. 3.x src/Entity/Idp.php \Drupal\saml_sp\Entity\Idp::setAuthnContextClassRef()

Sets the authentication methods requested for this IdP.

Parameters

array $authn_context_class_ref: The authentication methods.

Overrides IdpInterface::setAuthnContextClassRef

File

src/Entity/Idp.php, line 177

Class

Idp
Defines the Idp entity.

Namespace

Drupal\saml_sp\Entity

Code

public function setAuthnContextClassRef(array $authn_context_class_refs) {
  $array = [];
  foreach ($authn_context_class_refs as $value) {
    if ($value) {
      $array[$value] = $value;
    }
  }
  $this->authn_context_class_ref = $array;
}