void AuthRegistry::get_supported_methods(
int peer_type,
std::vector<uint32_t> *methods,
- std::vector<uint32_t> *modes)
+ std::vector<uint32_t> *modes) const
{
if (methods) {
methods->clear();
}
}
-bool AuthRegistry::is_supported_method(int peer_type, int method)
+bool AuthRegistry::is_supported_method(int peer_type, int method) const
{
std::vector<uint32_t> s;
get_supported_methods(peer_type, &s);
return std::find(s.begin(), s.end(), method) != s.end();
}
-bool AuthRegistry::any_supported_methods(int peer_type)
+bool AuthRegistry::any_supported_methods(int peer_type) const
{
std::vector<uint32_t> s;
get_supported_methods(peer_type, &s);
void AuthRegistry::get_supported_modes(
int peer_type,
uint32_t auth_method,
- std::vector<uint32_t> *modes)
+ std::vector<uint32_t> *modes) const
{
std::vector<uint32_t> s;
get_supported_methods(peer_type, nullptr, &s);
class AuthRegistry : public md_config_obs_t {
CephContext *cct;
- ceph::mutex lock = ceph::make_mutex("AuthRegistry::lock");
+ mutable ceph::mutex lock = ceph::make_mutex("AuthRegistry::lock");
std::map<int,AuthAuthorizeHandler*> authorize_handlers;
void get_supported_methods(int peer_type,
std::vector<uint32_t> *methods,
- std::vector<uint32_t> *modes=nullptr);
- bool is_supported_method(int peer_type, int method);
- bool any_supported_methods(int peer_type);
+ std::vector<uint32_t> *modes=nullptr) const;
+ bool is_supported_method(int peer_type, int method) const;
+ bool any_supported_methods(int peer_type) const;
void get_supported_modes(int peer_type,
uint32_t auth_method,
- std::vector<uint32_t> *modes);
+ std::vector<uint32_t> *modes) const;
uint32_t pick_mode(int peer_type,
uint32_t auth_method,