libzypp
10.5.0
|
Curl HTTP authentication data. More...
#include <MediaUserAuth.h>
Public Member Functions | |
CurlAuthData () | |
Default constructor. | |
CurlAuthData (const AuthData &authData) | |
CurlAuthData (std::string &username, std::string &password, std::string &auth_type) | |
CurlAuthData (std::string &username, std::string &password, long auth_type) | |
virtual bool | valid () const |
Checks validity of authentication data. | |
void | setAuthType (std::string auth_type) |
Set HTTP authentication type(s) to use. | |
void | setAuthType (long auth_type) |
long | authType () |
const std::string | authTypeAsString () |
const std::string | getUserPwd () const |
virtual std::ostream & | dumpOn (std::ostream &str) const |
Static Public Member Functions | |
static long | auth_type_str2long (std::string &auth_type_str) |
Converts a string of comma separated list of authetication type names into a long of ORed CURLAUTH_* identifiers. | |
static std::string | auth_type_long2str (long auth_type) |
Converts a long of ORed CURLAUTH_* identifiers into a string of comma separated list of authentication type names. | |
Private Attributes | |
std::string | _auth_type_str |
long | _auth_type |
Curl HTTP authentication data.
Definition at line 74 of file MediaUserAuth.h.
zypp::media::CurlAuthData::CurlAuthData | ( | ) |
Default constructor.
Initializes username and password to empty strings and authetication type to CURLAUTH_NONE.
Definition at line 69 of file MediaUserAuth.cc.
zypp::media::CurlAuthData::CurlAuthData | ( | const AuthData & | authData | ) |
Definition at line 75 of file MediaUserAuth.cc.
zypp::media::CurlAuthData::CurlAuthData | ( | std::string & | username, |
std::string & | password, | ||
std::string & | auth_type | ||
) | [inline] |
Definition at line 84 of file MediaUserAuth.h.
zypp::media::CurlAuthData::CurlAuthData | ( | std::string & | username, |
std::string & | password, | ||
long | auth_type | ||
) | [inline] |
Definition at line 90 of file MediaUserAuth.h.
bool zypp::media::CurlAuthData::valid | ( | ) | const [virtual] |
Checks validity of authentication data.
Reimplemented from zypp::media::AuthData.
Definition at line 81 of file MediaUserAuth.cc.
void zypp::media::CurlAuthData::setAuthType | ( | std::string | auth_type | ) | [inline] |
Set HTTP authentication type(s) to use.
comma | separated list of HTTP authentication type names |
Definition at line 107 of file MediaUserAuth.h.
void zypp::media::CurlAuthData::setAuthType | ( | long | auth_type | ) | [inline] |
Definition at line 117 of file MediaUserAuth.h.
long zypp::media::CurlAuthData::authType | ( | ) | [inline] |
Definition at line 123 of file MediaUserAuth.h.
const std::string zypp::media::CurlAuthData::authTypeAsString | ( | ) | [inline] |
Definition at line 124 of file MediaUserAuth.h.
const std::string zypp::media::CurlAuthData::getUserPwd | ( | ) | const [inline] |
Definition at line 126 of file MediaUserAuth.h.
long zypp::media::CurlAuthData::auth_type_str2long | ( | std::string & | auth_type_str | ) | [static] |
Converts a string of comma separated list of authetication type names into a long of ORed CURLAUTH_* identifiers.
The method also automatically leaves out any auth types declared not supported by curl_version_info().
MediaException | if an invalid authentication type name is encountered. |
Definition at line 93 of file MediaUserAuth.cc.
std::string zypp::media::CurlAuthData::auth_type_long2str | ( | long | auth_type | ) | [static] |
Converts a long of ORed CURLAUTH_* identifiers into a string of comma separated list of authentication type names.
Definition at line 145 of file MediaUserAuth.cc.
std::ostream & zypp::media::CurlAuthData::dumpOn | ( | std::ostream & | str | ) | const [virtual] |
Reimplemented from zypp::media::AuthData.
Definition at line 86 of file MediaUserAuth.cc.
std::string zypp::media::CurlAuthData::_auth_type_str [private] |
Definition at line 149 of file MediaUserAuth.h.
long zypp::media::CurlAuthData::_auth_type [private] |
Definition at line 150 of file MediaUserAuth.h.