|
libzypp
9.1.2
|
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 76 of file MediaUserAuth.h.
| zypp::media::CurlAuthData::CurlAuthData | ( | ) | [inline] |
Default constructor.
Initializes username and password to empty strings and authetication type to CURLAUTH_NONE.
Definition at line 82 of file MediaUserAuth.h.
| zypp::media::CurlAuthData::CurlAuthData | ( | const AuthData & | authData | ) | [inline] |
Definition at line 85 of file MediaUserAuth.h.
| zypp::media::CurlAuthData::CurlAuthData | ( | std::string & | username, |
| std::string & | password, | ||
| std::string & | auth_type | ||
| ) | [inline] |
Definition at line 91 of file MediaUserAuth.h.
References _auth_type, and auth_type_str2long().
| zypp::media::CurlAuthData::CurlAuthData | ( | std::string & | username, |
| std::string & | password, | ||
| long | auth_type | ||
| ) | [inline] |
Definition at line 97 of file MediaUserAuth.h.
References _auth_type_str, and auth_type_long2str().
| bool zypp::media::CurlAuthData::valid | ( | ) | const [virtual] |
Checks validity of authentication data.
Reimplemented from zypp::media::AuthData.
Definition at line 67 of file MediaUserAuth.cc.
References zypp::media::AuthData::password(), and zypp::media::AuthData::username().
| 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 114 of file MediaUserAuth.h.
References _auth_type, _auth_type_str, and auth_type_str2long().
| void zypp::media::CurlAuthData::setAuthType | ( | long | auth_type | ) | [inline] |
Definition at line 124 of file MediaUserAuth.h.
References _auth_type, _auth_type_str, and auth_type_long2str().
| long zypp::media::CurlAuthData::authType | ( | ) | [inline] |
Definition at line 130 of file MediaUserAuth.h.
References _auth_type.
| const std::string zypp::media::CurlAuthData::authTypeAsString | ( | ) | [inline] |
Definition at line 131 of file MediaUserAuth.h.
References _auth_type_str.
| const std::string zypp::media::CurlAuthData::getUserPwd | ( | ) | const [inline] |
Definition at line 133 of file MediaUserAuth.h.
References zypp::media::AuthData::password(), and zypp::media::AuthData::username().
| 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 80 of file MediaUserAuth.cc.
References _, zypp::str::split(), and ZYPP_THROW.
Referenced by CurlAuthData(), zypp::media::multifetchworker::multifetchworker(), setAuthType(), and zypp::media::MediaCurl::setupEasy().
| 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 132 of file MediaUserAuth.cc.
References zypp::str::join().
Referenced by CurlAuthData(), zypp::media::MediaCurl::getAuthHint(), and setAuthType().
| std::ostream & zypp::media::CurlAuthData::dumpOn | ( | std::ostream & | str | ) | const [virtual] |
Reimplemented from zypp::media::AuthData.
Definition at line 73 of file MediaUserAuth.cc.
References _auth_type, and _auth_type_str.
Referenced by zypp::media::operator<<().
std::string zypp::media::CurlAuthData::_auth_type_str [private] |
Definition at line 156 of file MediaUserAuth.h.
Referenced by authTypeAsString(), CurlAuthData(), dumpOn(), and setAuthType().
long zypp::media::CurlAuthData::_auth_type [private] |
Definition at line 157 of file MediaUserAuth.h.
Referenced by authType(), CurlAuthData(), dumpOn(), and setAuthType().
1.7.6.1