#include "remote/apiuser.hpp"
#include "remote/apiuser.tcpp"
+#include "base/dynamictype.hpp"
using namespace icinga;
{
return password == GetPasswordRaw();
}
+
+ApiUser::Ptr ApiUser::GetByClientCN(const String& cn)
+{
+ BOOST_FOREACH(const ApiUser::Ptr& user, DynamicType::GetObjectsByType<ApiUser>()) {
+ if (user->GetClientCN() == cn)
+ return user;
+ }
+
+ return ApiUser::Ptr();
+}
String GetPassword(void) const;
void SetPassword(const String& password);
bool CheckPassword(const String& password) const;
+
+ static ApiUser::Ptr GetByClientCN(const String& cn);
};
}
class ApiUser : DynamicObject
{
[config, protected] String password (PasswordRaw);
- [config] String client_cn;
+ [config] String client_cn (ClientCN);
};
}