A class for working with ZAP requests and replies.
More...
#include <zap_request.hpp>
|
| 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 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)
|
|
|
socket & | zap_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?
|
|
A class for working with ZAP requests and replies.
Used in auth to simplify working with RFC 27 messages.
◆ 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 |
◆ get_address()
const std::string & zmqpp::zap_request::get_address |
( |
| ) |
const |
|
inline |
◆ 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_identity()
const std::string & zmqpp::zap_request::get_identity |
( |
| ) |
const |
|
inline |
◆ get_mechanism()
const std::string & zmqpp::zap_request::get_mechanism |
( |
| ) |
const |
|
inline |
◆ 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 |
◆ operator=()
◆ 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 |
◆ address
std::string zmqpp::zap_request::address |
|
private |
◆ client_key
std::string zmqpp::zap_request::client_key |
|
private |
CURVE client public key in ASCII.
◆ domain
std::string zmqpp::zap_request::domain |
|
private |
◆ identity
std::string zmqpp::zap_request::identity |
|
private |
◆ mechanism
std::string zmqpp::zap_request::mechanism |
|
private |
◆ password
std::string zmqpp::zap_request::password |
|
private |
PLAIN password, in clear text.
◆ principal
std::string zmqpp::zap_request::principal |
|
private |
◆ sequence
std::string zmqpp::zap_request::sequence |
|
private |
Sequence number of request.
◆ username
std::string zmqpp::zap_request::username |
|
private |
◆ 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 |
The documentation for this class was generated from the following files: