/** * Factory build method for signature * * @param Request $request * @param array $options */ public function build($request, $options = array()) { $_this = Signature::getInstance(); $request = RequestFactory::proxy($request, $options); $signatureMethod = $request->signatureMethod(); if (isset($_this->availableMethods[$signatureMethod])) { $class = $_this->availableMethods[$signatureMethod]; } else { throw new Exception("UnknownSignatureMethod {$signatureMethod}"); } return new $class($request, $options); }
/** * testThatHmacSha1ImplementsRsaSha1 * * @return void */ public function testThatHmacSha1ImplementsRsaSha1() { $sig = Signature::getInstance(); $this->assertTrue(isset($sig->availableMethods['RSA-SHA1'])); }