File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 22 * Added: Added a very simple example for implementing a mapping to PHP
33 file streams. This should allow easy implementation of for example a
44 WebDAV to FTP proxy.
5+ * Added: HTTP Basic Authentication helper class.
6+ * Added: Sabre_HTTP_Reponse class. This centralizes HTTP operations and
7+ will be a start towards the creating of a testing framework.
58 * Updated: Backwards compatibility break: all require_once() statements
69 are removed
710 from all the files. It is now recommended to use autoloading of
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ // !!!! Make sure the Sabre directory is in the include_path !!!
4+
5+ // {$Id$} //
6+
7+ // settings
8+ date_default_timezone_set ('Canada/Eastern ' );
9+
10+ // Files we need
11+ require_once 'Sabre.includes.php ' ;
12+
13+ $ u = 'admin ' ;
14+ $ p = '1234 ' ;
15+
16+ $ auth = new Sabre_HTTP_BasicAuth ();
17+
18+ $ result = $ auth ->getUserPass ();
19+
20+ if (!$ result || $ result [0 ]!=$ u || $ result [1 ]!=$ p ) {
21+
22+ $ auth ->requireLogin ();
23+ echo "Authentication required \n" ;
24+ die ();
25+
26+ }
27+
28+ ?>
You can’t perform that action at this time.
0 commit comments