OpenTTD Source 20260206-master-g4d4e37dbf1
NetworkAuthenticationPasswordRequestHandler Class Referenceabstract

Callback interface for client implementations to provide the handling of the password requests. More...

#include <network_crypto.h>

Inheritance diagram for NetworkAuthenticationPasswordRequestHandler:
NetworkAuthenticationPasswordRequest ClientGamePasswordRequestHandler TestPasswordRequestHandler

Public Member Functions

void Reply (const std::string &password) override
 Reply to the request with the given password.
virtual void SendResponse ()=0
 Callback to trigger sending the response for the password request.
virtual void AskUserForPassword (std::shared_ptr< NetworkAuthenticationPasswordRequest > request)=0
 Callback to trigger asking the user for the password.

Protected Attributes

std::string password
 The entered password.

Friends

class X25519PAKEClientHandler

Detailed Description

Callback interface for client implementations to provide the handling of the password requests.

Definition at line 84 of file network_crypto.h.

Member Function Documentation

◆ AskUserForPassword()

virtual void NetworkAuthenticationPasswordRequestHandler::AskUserForPassword ( std::shared_ptr< NetworkAuthenticationPasswordRequest > request)
pure virtual

Callback to trigger asking the user for the password.

Parameters
requestThe request to the user, to which it can reply with the password.

Implemented in ClientGamePasswordRequestHandler, and TestPasswordRequestHandler.

◆ Reply()

void NetworkAuthenticationPasswordRequestHandler::Reply ( const std::string & password)
overridevirtual

Reply to the request with the given password.

Implements NetworkAuthenticationPasswordRequest.

Definition at line 440 of file network_crypto.cpp.

References password, and SendResponse().

◆ SendResponse()

virtual void NetworkAuthenticationPasswordRequestHandler::SendResponse ( )
pure virtual

Callback to trigger sending the response for the password request.

Implemented in ClientGamePasswordRequestHandler, and TestPasswordRequestHandler.

Referenced by Reply().

◆ X25519PAKEClientHandler

friend class X25519PAKEClientHandler
friend

Definition at line 86 of file network_crypto.h.

Field Documentation

◆ password

std::string NetworkAuthenticationPasswordRequestHandler::password
protected

The entered password.

Definition at line 88 of file network_crypto.h.

Referenced by Reply().


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