Bitcoin
Classes | Functions | Variables
httprpc.cpp File Reference
#include <httprpc.h>
#include <chainparams.h>
#include <httpserver.h>
#include <key_io.h>
#include <rpc/protocol.h>
#include <rpc/server.h>
#include <sync.h>
#include <util/system.h>
#include <util/strencodings.h>
#include <ui_interface.h>
#include <walletinitinterface.h>
#include <crypto/hmac_sha256.h>
#include <stdio.h>
#include <memory>
#include <boost/algorithm/string.hpp>

Classes

class  HTTPRPCTimer
 
class  HTTPRPCTimerInterface
 

Functions

static void JSONErrorReply (HTTPRequest *req, const UniValue &objError, const UniValue &id)
 
static bool multiUserAuthorized (std::string strUserPass)
 
static bool RPCAuthorized (const std::string &strAuth, std::string &strAuthUsernameOut)
 
static bool HTTPReq_JSONRPC (HTTPRequest *req, const std::string &)
 
static bool InitRPCAuthentication ()
 
bool StartHTTPRPC ()
 
void InterruptHTTPRPC ()
 
void StopHTTPRPC ()
 

Variables

static const char * WWW_AUTH_HEADER_DATA = "Basic realm=\"jsonrpc\""
 
static std::string strRPCUserColonPass
 
static std::unique_ptr< HTTPRPCTimerInterfacehttpRPCTimerInterface
 

Function Documentation

◆ HTTPReq_JSONRPC()

static bool HTTPReq_JSONRPC ( HTTPRequest req,
const std::string &   
)
static

◆ InitRPCAuthentication()

static bool InitRPCAuthentication ( )
static

◆ InterruptHTTPRPC()

void InterruptHTTPRPC ( )

Interrupt HTTP RPC subsystem.

◆ JSONErrorReply()

static void JSONErrorReply ( HTTPRequest req,
const UniValue objError,
const UniValue id 
)
static

◆ multiUserAuthorized()

static bool multiUserAuthorized ( std::string  strUserPass)
static

◆ RPCAuthorized()

static bool RPCAuthorized ( const std::string &  strAuth,
std::string &  strAuthUsernameOut 
)
static

◆ StartHTTPRPC()

bool StartHTTPRPC ( )

Start HTTP RPC subsystem. Precondition; HTTP and RPC has been started.

◆ StopHTTPRPC()

void StopHTTPRPC ( )

Stop HTTP RPC subsystem. Precondition; HTTP and RPC has been stopped.

Variable Documentation

◆ httpRPCTimerInterface

std::unique_ptr<HTTPRPCTimerInterface> httpRPCTimerInterface
static

◆ strRPCUserColonPass

std::string strRPCUserColonPass
static

◆ WWW_AUTH_HEADER_DATA

const char* WWW_AUTH_HEADER_DATA = "Basic realm=\"jsonrpc\""
static

WWW-Authenticate to present with 401 Unauthorized response