SAML2\CertificatesMock::getPrivateKey PHP Method

getPrivateKey() public static method

public static getPrivateKey ( ) : XMLSecurityKey
return RobRichards\XMLSecLibs\XMLSecurityKey
    public static function getPrivateKey()
    {
        $privateKey = new XMLSecurityKey(XMLSecurityKey::RSA_1_5, array('type' => 'private'));
        $privateKey->loadKey(self::PRIVATE_KEY_PEM);
        return $privateKey;
    }

Usage Example

Esempio n. 1
0
 /**
  * Construct an authnresponse and send it.
  * Also test setting a relaystate and destination for the response.
  */
 public function testSendAuthnResponse()
 {
     $response = new Response();
     $response->setIssuer('testIssuer');
     $response->setRelayState('http://example.org');
     $response->setDestination('http://example.org/login?success=yes');
     $response->setSignatureKey(CertificatesMock::getPrivateKey());
     $hr = new HTTPPost();
     $hr->send($response);
 }
All Usage Examples Of SAML2\CertificatesMock::getPrivateKey