Panda3D
panda
src
downloader
httpBasicAuthorization.h
Go to the documentation of this file.
1
/**
2
* PANDA 3D SOFTWARE
3
* Copyright (c) Carnegie Mellon University. All rights reserved.
4
*
5
* All use of this software is subject to the terms of the revised BSD
6
* license. You should have received a copy of this license along
7
* with this source code in a file named "LICENSE."
8
*
9
* @file httpBasicAuthorization.h
10
* @author drose
11
* @date 2002-10-22
12
*/
13
14
#ifndef HTTPBASICAUTHORIZATION_H
15
#define HTTPBASICAUTHORIZATION_H
16
17
#include "
pandabase.h
"
18
19
// This module requires OpenSSL to compile, even though it doesn't actually
20
// use any OpenSSL code, because it is a support module for HTTPChannel, which
21
// *does* use OpenSSL code.
22
23
#ifdef HAVE_OPENSSL
24
25
#include "
httpAuthorization.h
"
26
27
/**
28
* Implements the "Basic" type of HTTP authorization. This authorization
29
* sends usernames and passwords over the net in cleartext, so it's not much
30
* in the way of security, but it's easy to implement and therefore widely
31
* supported.
32
*/
33
class
HTTPBasicAuthorization :
public
HTTPAuthorization {
34
public
:
35
HTTPBasicAuthorization(
const
Tokens &tokens,
const
URLSpec
&url,
36
bool
is_proxy);
37
virtual
~HTTPBasicAuthorization();
38
39
virtual
const
std::string &get_mechanism()
const
;
40
virtual
std::string generate(HTTPEnum::Method method,
const
std::string &request_path,
41
const
std::string &username,
const
std::string &body);
42
43
private
:
44
static
const
std::string _mechanism;
45
};
46
47
#include "
httpBasicAuthorization.I
"
48
49
#endif // HAVE_OPENSSL
50
51
#endif
URLSpec
A container for a URL, e.g.
Definition:
urlSpec.h:28
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
httpAuthorization.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
httpBasicAuthorization.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Generated on Sat Jan 11 2020 15:14:49 for Panda3D by
1.8.17