]>
git.proxmox.com Git - ceph.git/blob - ceph/src/auth/AuthClient.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
8 #include "include/buffer_fwd.h"
10 class AuthConnectionMeta
;
16 virtual ~AuthClient() {}
18 /// Build an authentication request to begin the handshake
19 virtual int get_auth_request(
21 AuthConnectionMeta
*auth_meta
,
23 std::vector
<uint32_t> *preferred_modes
,
24 ceph::buffer::list
*out
) = 0;
26 /// Handle server's request to continue the handshake
27 virtual int handle_auth_reply_more(
29 AuthConnectionMeta
*auth_meta
,
30 const ceph::buffer::list
& bl
,
31 ceph::buffer::list
*reply
) = 0;
33 /// Handle server's indication that authentication succeeded
34 virtual int handle_auth_done(
36 AuthConnectionMeta
*auth_meta
,
39 const ceph::buffer::list
& bl
,
40 CryptoKey
*session_key
,
41 std::string
*connection_secret
) = 0;
43 /// Handle server's indication that the previous auth attempt failed
44 virtual int handle_auth_bad_method(
46 AuthConnectionMeta
*auth_meta
,
47 uint32_t old_auth_method
,
49 const std::vector
<uint32_t>& allowed_methods
,
50 const std::vector
<uint32_t>& allowed_modes
) = 0;