1<?php
2require_once "Auth/HTTP.php";
3define('DSN','sqlite://dummy:@localhost//tmp/user.db?mode=0644');
4
5$options = array('dsn'=>DSN, 'authType'=>'digest');
6$auth = new Auth_HTTP("DB", $options);
7
8$auth->setRealm('dummy', 'sample');
9$auth->start();
10
11?>
12<html>
13<head><title>HTTP digest authentication test for simple case</title></head>
14<body>
15<?php
16print "auth: ".$auth->authType."<br />";
17print "username: ".$auth->username."<br />";
18print "password: ".$auth->password."<br />";
19print "auth: ".print_r($auth->auth)."<br />";
20if($auth->getAuth()) {
21  print "authentication is succeeded.<br />";
22}
23?>
24</body></html>
25