Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/downloader/httpBasicAuthorization.h

Go to the documentation of this file.
00001 // Filename: httpBasicAuthorization.h
00002 // Created by:  drose (22Oct02)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef HTTPBASICAUTHORIZATION_H
00020 #define HTTPBASICAUTHORIZATION_H
00021 
00022 #include "pandabase.h"
00023 
00024 // This module requires OpenSSL to compile, even though it doesn't
00025 // actually use any OpenSSL code, because it is a support module for
00026 // HTTPChannel, which *does* use OpenSSL code.
00027 
00028 #ifdef HAVE_SSL
00029 
00030 #include "httpAuthorization.h"
00031 
00032 ////////////////////////////////////////////////////////////////////
00033 //       Class : HTTPBasicAuthorization
00034 // Description : Implements the "Basic" type of HTTP authorization.
00035 //               This authorization sends usernames and passwords over
00036 //               the net in cleartext, so it's not much in the way of
00037 //               security, but it's easy to implement and therefore
00038 //               widely supported.
00039 ////////////////////////////////////////////////////////////////////
00040 class HTTPBasicAuthorization : public HTTPAuthorization {
00041 public:
00042   HTTPBasicAuthorization(const Tokens &tokens, const URLSpec &url,
00043                          bool is_proxy);
00044   virtual ~HTTPBasicAuthorization();
00045 
00046   virtual const string &get_mechanism() const;
00047   virtual string generate(HTTPEnum::Method method, const string &request_path,
00048                           const string &username, const string &body);
00049 
00050 private:
00051   static const string _mechanism;
00052 };
00053 
00054 #include "httpBasicAuthorization.I"
00055 
00056 #endif  // HAVE_SSL
00057 
00058 #endif
00059 

Generated on Fri May 2 00:36:47 2003 for Panda by doxygen1.3