mirror of
https://github.com/aria2/aria2.git
synced 2026-04-13 08:18:46 +00:00
2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Defined default ftp user and password as static const std::string * src/AuthConfigFactory.cc * src/AuthConfigFactory.h
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Defined default ftp user and password as static const std::string
|
||||
* src/AuthConfigFactory.cc
|
||||
* src/AuthConfigFactory.h
|
||||
|
||||
2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Defined strings used in netrc as static const std::string
|
||||
|
||||
@@ -43,6 +43,10 @@
|
||||
|
||||
namespace aria2 {
|
||||
|
||||
const std::string AuthConfigFactory::ANONYMOUS("anonymous");
|
||||
|
||||
const std::string AuthConfigFactory::ARIA2USER_AT("ARIA2USER@");
|
||||
|
||||
AuthConfigFactory::AuthConfigFactory(const Option* option):
|
||||
_option(option) {}
|
||||
|
||||
@@ -106,7 +110,9 @@ AuthResolverHandle AuthConfigFactory::createFtpAuthResolver() const
|
||||
resolver = authResolver;
|
||||
}
|
||||
resolver->setUserDefinedAuthConfig(createAuthConfig(_option->get(PREF_FTP_USER), _option->get(PREF_FTP_PASSWD)));
|
||||
SharedHandle<AuthConfig> defaultAuthConfig(new AuthConfig("anonymous", "ARIA2USER@"));
|
||||
SharedHandle<AuthConfig> defaultAuthConfig
|
||||
(new AuthConfig(AuthConfigFactory::ANONYMOUS,
|
||||
AuthConfigFactory::ARIA2USER_AT));
|
||||
resolver->setDefaultAuthConfig(defaultAuthConfig);
|
||||
return resolver;
|
||||
}
|
||||
|
||||
@@ -73,6 +73,10 @@ public:
|
||||
SharedHandle<AuthConfig> createAuthConfigForHttpProxy(const SharedHandle<Request>& request) const;
|
||||
|
||||
void setNetrc(const SharedHandle<Netrc>& netrc);
|
||||
|
||||
static const std::string ANONYMOUS;
|
||||
|
||||
static const std::string ARIA2USER_AT;
|
||||
};
|
||||
|
||||
typedef SharedHandle<AuthConfigFactory> AuthConfigFactoryHandle;
|
||||
|
||||
Reference in New Issue
Block a user