2020-05-27 21:06:33 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Access/LDAPParams.h>
|
|
|
|
#include <Core/Types.h>
|
|
|
|
|
|
|
|
#include <map>
|
2020-05-29 07:47:01 +00:00
|
|
|
#include <memory>
|
2020-05-27 21:06:33 +00:00
|
|
|
#include <mutex>
|
|
|
|
|
|
|
|
|
2020-05-29 12:14:42 +00:00
|
|
|
namespace Poco
|
|
|
|
{
|
2020-05-29 07:47:01 +00:00
|
|
|
class Logger;
|
2020-05-29 12:14:42 +00:00
|
|
|
|
2020-05-29 07:47:01 +00:00
|
|
|
namespace Util
|
|
|
|
{
|
|
|
|
class AbstractConfiguration;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-05-27 21:06:33 +00:00
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class ExternalAuthenticators
|
|
|
|
{
|
|
|
|
public:
|
2020-07-11 17:06:01 +00:00
|
|
|
void reset();
|
|
|
|
void setConfig(const Poco::Util::AbstractConfiguration & config, Poco::Logger * log);
|
2020-06-02 09:37:02 +00:00
|
|
|
|
2020-05-27 21:06:33 +00:00
|
|
|
void setLDAPServerParams(const String & server, const LDAPServerParams & params);
|
|
|
|
LDAPServerParams getLDAPServerParams(const String & server) const;
|
|
|
|
|
|
|
|
private:
|
2020-07-11 17:06:01 +00:00
|
|
|
mutable std::recursive_mutex mutex;
|
2020-05-27 21:06:33 +00:00
|
|
|
std::map<String, LDAPServerParams> ldap_server_params;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|