00001 #include <string>
00002 #include <map>
00003 #include <arc/UserConfig.h>
00004 #include <arc/message/MCC.h>
00005 #include <arc/URL.h>
00006 #include <arc/StringConv.h>
00007
00008 namespace Arc {
00009
00016 class CredentialStore {
00017 private:
00018 static const int default_port = 7512;
00019 bool valid;
00020 int timeout;
00021 void set(const std::string& host, int port, const UserConfig& cfg);
00022 MCCConfig concfg;
00023 std::string host;
00024 int port;
00025 public:
00026 CredentialStore(const URL& url);
00027 CredentialStore(const UserConfig& cfg, const URL& url);
00028 ~CredentialStore(void);
00029 operator bool(void) { return valid; };
00030 bool operator!(void) { return !valid; };
00031
00032
00033
00034
00035
00036
00037 bool Store(const std::map<std::string,std::string>& options,
00038 const std::string& cred = "", bool if_delegate = true, const Arc::Time deleg_start = Arc::Time(), const Arc::Period deleg_period = 604800);
00039 bool Retrieve(const std::map<std::string,std::string>& options,
00040 std::string& cred, bool if_delegate = true);
00041 bool Info(const std::map<std::string,std::string>& options,std::string& respinfo);
00042 bool Destroy(const std::map<std::string,std::string>& options);
00043 bool ChangePassword(const std::map<std::string,std::string>& options);
00044 };
00045
00046 }