OpenTTD Source 20260218-master-g2123fca5ea
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

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 85 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.

◆ Reply()

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

Reply to the request with the given password.

Parameters
passwordThe requested password from the user.

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.

Referenced by Reply().

◆ X25519PAKEClientHandler

friend class X25519PAKEClientHandler
friend

Definition at line 87 of file network_crypto.h.

Field Documentation

◆ password

std::string NetworkAuthenticationPasswordRequestHandler::password
protected

The entered password.

Definition at line 89 of file network_crypto.h.

Referenced by Reply().


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