You are here

private function IdentityProviders::parsex509Certificate in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 8

1 call to IdentityProviders::parsex509Certificate()
IdentityProviders::__construct in src/MetadataReader.php

File

src/MetadataReader.php, line 111

Class

IdentityProviders

Namespace

Drupal\miniorange_saml

Code

private function parsex509Certificate($xml) {
  foreach (Utilities::xpQuery($xml, './saml_metadata:KeyDescriptor') as $KeyDescriptorNode) {
    if ($KeyDescriptorNode
      ->hasAttribute('use')) {
      if ($KeyDescriptorNode
        ->getAttribute('use') == 'encryption') {
        $this
          ->parseEncryptionCertificate($KeyDescriptorNode);
      }
      else {
        $this
          ->parseSigningCertificate($KeyDescriptorNode);
      }
    }
    else {
      $this
        ->parseSigningCertificate($KeyDescriptorNode);
    }
  }
}