zmqpp 4.1.2
C++ bindings for 0mq (libzmq)
Loading...
Searching...
No Matches
zmqpp::zap_request Class Reference

A class for working with ZAP requests and replies. More...

#include <zap_request.hpp>

Collaboration diagram for zmqpp::zap_request:

Public Member Functions

 zap_request (socket &handler, bool logging)
 Receive a ZAP valid request from the handler socket.
 
void reply (const std::string &status_code, const std::string &status_text, const std::string &user_id, const std::unordered_map< std::string, std::string > &metadata_pairs=std::unordered_map< std::string, std::string >())
 Send a ZAP reply to the handler socket.
 
const std::string & get_version () const
 Get Version.
 
const std::string & get_domain () const
 Get Domain.
 
const std::string & get_address () const
 Get Address.
 
const std::string & get_identity () const
 Get Identity.
 
const std::string & get_mechanism () const
 Get Security Mechanism.
 
const std::string & get_username () const
 Get username for PLAIN security mechanism.
 
const std::string & get_password () const
 Get password for PLAIN security mechanism.
 
const std::string & get_client_key () const
 
const std::string & get_principal () const
 Get principal for GSSAPI security mechanism.
 

Static Public Member Functions

static std::vector< std::uint8_t > serialize_metadata (const std::unordered_map< std::string, std::string > &metadata_pairs)
 Serialize a map of metadata (name, value) pairs to ZMTP/3.0 wire format as specified in ZRFC27 (http://rfc.zeromq.org/spec:27)
 

Private Member Functions

 zap_request (zap_request const &) ZMQPP_EXPLICITLY_DELETED
 
zap_requestoperator= (zap_request const &) NOEXCEPT ZMQPP_EXPLICITLY_DELETED
 

Private Attributes

socketzap_socket
 Socket we're talking to.
 
std::string version
 Version number, must be "1.0".
 
std::string sequence
 Sequence number of request.
 
std::string domain
 Server socket domain.
 
std::string address
 Client IP address.
 
std::string identity
 Server socket idenntity.
 
std::string mechanism
 Security mechansim.
 
std::string username
 PLAIN user name.
 
std::string password
 PLAIN password, in clear text.
 
std::string client_key
 CURVE client public key in ASCII.
 
std::string principal
 GSSAPI client principal.
 
bool verbose
 Log ZAP requests and replies?
 

Detailed Description

A class for working with ZAP requests and replies.

Used in auth to simplify working with RFC 27 messages.

Constructor & Destructor Documentation

◆ zap_request() [1/2]

zmqpp::zap_request::zap_request ( socket & handler,
bool logging )

Receive a ZAP valid request from the handler socket.

Receive a ZAP valid request from the handler socket

◆ zap_request() [2/2]

zmqpp::zap_request::zap_request ( zap_request const & )
private

Member Function Documentation

◆ get_address()

const std::string & zmqpp::zap_request::get_address ( ) const
inline

Get Address.

◆ get_client_key()

const std::string & zmqpp::zap_request::get_client_key ( ) const
inline

Get client_key for CURVE security mechanism. The key is z85 encoded.

◆ get_domain()

const std::string & zmqpp::zap_request::get_domain ( ) const
inline

Get Domain.

◆ get_identity()

const std::string & zmqpp::zap_request::get_identity ( ) const
inline

Get Identity.

◆ get_mechanism()

const std::string & zmqpp::zap_request::get_mechanism ( ) const
inline

Get Security Mechanism.

◆ get_password()

const std::string & zmqpp::zap_request::get_password ( ) const
inline

Get password for PLAIN security mechanism.

◆ get_principal()

const std::string & zmqpp::zap_request::get_principal ( ) const
inline

Get principal for GSSAPI security mechanism.

◆ get_username()

const std::string & zmqpp::zap_request::get_username ( ) const
inline

Get username for PLAIN security mechanism.

◆ get_version()

const std::string & zmqpp::zap_request::get_version ( ) const
inline

Get Version.

◆ operator=()

zap_request & zmqpp::zap_request::operator= ( zap_request const & )
private

◆ reply()

void zmqpp::zap_request::reply ( const std::string & status_code,
const std::string & status_text,
const std::string & user_id,
const std::unordered_map< std::string, std::string > & metadata_pairs = std::unordered_map<std::string, std::string>() )

Send a ZAP reply to the handler socket.

Send a ZAP reply to the handler socket

◆ serialize_metadata()

std::vector< std::uint8_t > zmqpp::zap_request::serialize_metadata ( const std::unordered_map< std::string, std::string > & metadata_pairs)
static

Serialize a map of metadata (name, value) pairs to ZMTP/3.0 wire format as specified in ZRFC27 (http://rfc.zeromq.org/spec:27)

Member Data Documentation

◆ address

std::string zmqpp::zap_request::address
private

Client IP address.

◆ client_key

std::string zmqpp::zap_request::client_key
private

CURVE client public key in ASCII.

◆ domain

std::string zmqpp::zap_request::domain
private

Server socket domain.

◆ identity

std::string zmqpp::zap_request::identity
private

Server socket idenntity.

◆ mechanism

std::string zmqpp::zap_request::mechanism
private

Security mechansim.

◆ password

std::string zmqpp::zap_request::password
private

PLAIN password, in clear text.

◆ principal

std::string zmqpp::zap_request::principal
private

GSSAPI client principal.

◆ sequence

std::string zmqpp::zap_request::sequence
private

Sequence number of request.

◆ username

std::string zmqpp::zap_request::username
private

PLAIN user name.

◆ verbose

bool zmqpp::zap_request::verbose
private

Log ZAP requests and replies?

◆ version

std::string zmqpp::zap_request::version
private

Version number, must be "1.0".

◆ zap_socket

socket& zmqpp::zap_request::zap_socket
private

Socket we're talking to.


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