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

#include <handlers.hpp>

Inheritance diagram for sshpp::server::SimpleAuthHandler:
[legend]
Collaboration diagram for sshpp::server::SimpleAuthHandler:
[legend]

Public Member Functions

void allow_password (std::string user, SecureString password)
 
void allow_public_key (std::string user, Key public_key)
 
void allow_none (std::string user)
 
void set_max_attempts (int n) noexcept
 
AuthResult on_auth_none (Session &, std::string_view user) override
 
AuthResult on_auth_password (Session &, std::string_view user, const SecureString &) override
 
AuthResult on_auth_public_key (Session &, std::string_view user, const Key &, PublicKeyState) override
 
- Public Member Functions inherited from sshpp::server::SessionHandler
virtual ~SessionHandler ()=default
 
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

Authenticates against an in-memory table. For tests, appliances, and quick starts. Passwords are compared in constant time; never logged (SecureString).

Member Function Documentation

◆ allow_password()

SSHPP_INLINE void sshpp::server::SimpleAuthHandler::allow_password ( std::string  user,
SecureString  password 
)

◆ allow_public_key()

SSHPP_INLINE void sshpp::server::SimpleAuthHandler::allow_public_key ( std::string  user,
Key  public_key 
)

◆ allow_none()

SSHPP_INLINE void sshpp::server::SimpleAuthHandler::allow_none ( std::string  user)

◆ set_max_attempts()

void sshpp::server::SimpleAuthHandler::set_max_attempts ( int  n)
inlinenoexcept

◆ on_auth_none()

SSHPP_INLINE AuthResult sshpp::server::SimpleAuthHandler::on_auth_none ( Session ,
std::string_view  user 
)
overridevirtual

Reimplemented from sshpp::server::SessionHandler.

◆ on_auth_password()

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

Reimplemented from sshpp::server::SessionHandler.

◆ on_auth_public_key()

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

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

Reimplemented from sshpp::server::SessionHandler.


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