Support for authentication

This commit is contained in:
Evan Seguin
2012-07-19 12:52:13 -07:00
parent 1c503f13ff
commit 78a0f180d0
8 changed files with 134 additions and 17 deletions

View File

@@ -0,0 +1,24 @@
<?php
require_once(dirname(__FILE__) . "/HeaderAuth.php");
class BasicAuth extends HeaderAuth {
private $header;
function __construct($username, $password) {
$headerValue = $username . ":" . $password;
$this->header = "Authorization: " . base64_encode($headerValue);
}
public function handleHeader() {
return $this->header;
}
public function handleParams() {
return null;
}
}
?>