Support for authentication
This commit is contained in:
18
main/mashape/auth/MashapeAuth.php
Normal file
18
main/mashape/auth/MashapeAuth.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
require_once(dirname(__FILE__) . "/../http/AuthUtil.php");
|
||||
require_once(dirname(__FILE__) . "/HeaderAuth.php");
|
||||
|
||||
class MashapeAuth extends HeaderAuth {
|
||||
|
||||
private $header;
|
||||
|
||||
function __construct($publicKey, $privateKey) {
|
||||
$this->header = AuthUtil::generateAuthenticationHeader($publicKey, $privateKey);
|
||||
}
|
||||
|
||||
public function handleHeader() {
|
||||
return $this->header;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user