1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
9 #include "crimson/net/Fwd.h"
11 struct AuthAuthorizeHandler
;
13 namespace crimson::auth
{
17 virtual ~AuthServer() {}
19 // Get authentication methods and connection modes for the given peer type
20 virtual std::pair
<std::vector
<uint32_t>, std::vector
<uint32_t>>
21 get_supported_auth_methods(int peer_type
) = 0;
22 // Get support connection modes for the given peer type and auth method
23 virtual uint32_t pick_con_mode(
26 const std::vector
<uint32_t>& preferred_modes
) = 0;
27 // return an AuthAuthorizeHandler for the given peer type and auth method
28 virtual AuthAuthorizeHandler
* get_auth_authorize_handler(
31 // Handle an authentication request on an incoming connection
32 virtual int handle_auth_request(
33 crimson::net::ConnectionRef conn
,
34 AuthConnectionMetaRef auth_meta
,
35 bool more
, //< true if this is not the first part of the handshake
38 bufferlist
*reply
) = 0;
41 } // namespace crimson::auth