#include "cephx/CephxClientHandler.h"
#include "none/AuthNoneClientHandler.h"
-AuthClientHandler *get_auth_client_handler(CephContext *cct, int proto,
- RotatingKeyRing *rkeys)
+
+AuthClientHandler* AuthClientHandler::create(CephContext *cct, int proto,
+ RotatingKeyRing *rkeys)
{
switch (proto) {
case CEPH_AUTH_CEPHX:
virtual bool need_tickets() = 0;
virtual void set_global_id(uint64_t id) = 0;
+
+ static AuthClientHandler* create(CephContext *cct,
+ int proto, RotatingKeyRing *rkeys);
protected:
virtual void validate_tickets() = 0;
};
-
-extern AuthClientHandler *get_auth_client_handler(CephContext *cct,
- int proto, RotatingKeyRing *rkeys);
-
#endif
return 0;
}
- auth.reset(get_auth_client_handler(cct, m->protocol, keyring));
+ auth.reset(AuthClientHandler::create(cct, m->protocol, keyring));
if (!auth) {
ldout(cct, 10) << "no handler for protocol " << m->protocol << dendl;
if (m->result == -ENOTSUP) {