libsshpp v0.1.7
Modern C++17 wrapper for libssh
Loading...
Searching...
No Matches
sshpp::server::SessionHandler Class Reference

#include <handlers.hpp>

Inheritance diagram for sshpp::server::SessionHandler:
[legend]

Public Member Functions

virtual ~SessionHandler ()=default
 
virtual AuthResult on_auth_none (Session &, std::string_view user)
 
virtual AuthResult on_auth_password (Session &, std::string_view user, const SecureString &password)
 
virtual AuthResult on_auth_public_key (Session &, std::string_view user, const Key &, PublicKeyState state)
 
virtual AuthResult on_auth_gssapi_mic (Session &, std::string_view user, std::string_view principal)
 
virtual std::shared_ptr< class ChannelHandleron_channel_open_session (Session &)
 Return nullptr to refuse the channel.
 
virtual void on_service_request (Session &, std::string_view service)
 
virtual void on_disconnect (Session &)
 
virtual void on_error (Session &, const ErrorInfo &)
 

Detailed Description

Per-session authentication/channel-open policy. All auth hooks default to denied; override only what you need. See docs/design/08 ยง8.6.

Constructor & Destructor Documentation

◆ ~SessionHandler()

virtual sshpp::server::SessionHandler::~SessionHandler ( )
virtualdefault

Member Function Documentation

◆ on_auth_none()

SSHPP_INLINE AuthResult sshpp::server::SessionHandler::on_auth_none ( Session ,
std::string_view  user 
)
virtual

◆ on_auth_password()

SSHPP_INLINE AuthResult sshpp::server::SessionHandler::on_auth_password ( Session ,
std::string_view  user,
const SecureString password 
)
virtual

◆ on_auth_public_key()

SSHPP_INLINE AuthResult sshpp::server::SessionHandler::on_auth_public_key ( Session ,
std::string_view  user,
const Key ,
PublicKeyState  state 
)
virtual

state == none -> client is offering a key; return success to say "acceptable" state == valid -> signature verified; return success to authenticate

Reimplemented in sshpp::server::SimpleAuthHandler.

◆ on_auth_gssapi_mic()

SSHPP_INLINE AuthResult sshpp::server::SessionHandler::on_auth_gssapi_mic ( Session ,
std::string_view  user,
std::string_view  principal 
)
virtual

◆ on_channel_open_session()

SSHPP_INLINE std::shared_ptr< ChannelHandler > sshpp::server::SessionHandler::on_channel_open_session ( Session )
virtual

Return nullptr to refuse the channel.

◆ on_service_request()

SSHPP_INLINE void sshpp::server::SessionHandler::on_service_request ( Session ,
std::string_view  service 
)
virtual

◆ on_disconnect()

SSHPP_INLINE void sshpp::server::SessionHandler::on_disconnect ( Session )
virtual

◆ on_error()

SSHPP_INLINE void sshpp::server::SessionHandler::on_error ( Session ,
const ErrorInfo  
)
virtual

The documentation for this class was generated from the following files: