BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Public Member Functions | List of all members
graphene::app::login_api Class Reference

The login_api class implements the bottom layer of the RPC API. More...

#include <api.hpp>

Public Member Functions

 login_api (application &a)
 
variant login (const optional< string > &user, const optional< string > &password)
 Authenticate to the RPC server, or retrieve the API set ID of the login API set. More...
 
bool logout ()
 Log out. More...
 
string get_info () const
 Retrive the node info string configured by the node operator. More...
 
application_options get_config () const
 Retrieve configured application options. More...
 
flat_set< string > get_available_api_sets () const
 Retrieve a list of API sets that the user has access to. More...
 
fc::api< block_apiblock ()
 Retrieve the network block API set. More...
 
fc::api< network_broadcast_apinetwork_broadcast ()
 Retrieve the network broadcast API set. More...
 
fc::api< database_apidatabase ()
 Retrieve the database API set. More...
 
fc::api< history_apihistory ()
 Retrieve the history API set. More...
 
fc::api< network_node_apinetwork_node ()
 Retrieve the network node API set. More...
 
fc::api< crypto_apicrypto ()
 Retrieve the cryptography API set. More...
 
fc::api< asset_apiasset ()
 Retrieve the asset API set. More...
 
fc::api< orders_apiorders ()
 Retrieve the orders API set. More...
 
fc::api< graphene::debug_witness::debug_apidebug ()
 Retrieve the debug API set. More...
 
fc::api< custom_operations_apicustom_operations ()
 Retrieve the custom operations API set. More...
 
fc::api< dummy_apidummy ()
 Retrieve a dummy API set, not reflected. More...
 
bool is_database_api_allowed () const
 Check whether database_api is allowed, not reflected. More...
 

Detailed Description

The login_api class implements the bottom layer of the RPC API.

All other APIs must be requested from this API.

Definition at line 720 of file api.hpp.

Constructor & Destructor Documentation

◆ login_api()

graphene::app::login_api::login_api ( application a)
explicit

Definition at line 50 of file api.cpp.

Member Function Documentation

◆ asset()

fc::api< asset_api > graphene::app::login_api::asset ( )

Retrieve the asset API set.

Definition at line 310 of file api.cpp.

◆ block()

fc::api< block_api > graphene::app::login_api::block ( )

Retrieve the network block API set.

Definition at line 254 of file api.cpp.

◆ crypto()

fc::api< crypto_api > graphene::app::login_api::crypto ( )

Retrieve the cryptography API set.

Definition at line 299 of file api.cpp.

◆ custom_operations()

fc::api< custom_operations_api > graphene::app::login_api::custom_operations ( )

Retrieve the custom operations API set.

Definition at line 346 of file api.cpp.

◆ database()

fc::api< database_api > graphene::app::login_api::database ( )

Retrieve the database API set.

Definition at line 276 of file api.cpp.

◆ debug()

fc::api< graphene::debug_witness::debug_api > graphene::app::login_api::debug ( )

Retrieve the debug API set.

Definition at line 332 of file api.cpp.

◆ dummy()

fc::api< dummy_api > graphene::app::login_api::dummy ( )

Retrieve a dummy API set, not reflected.

Definition at line 360 of file api.cpp.

◆ get_available_api_sets()

flat_set< string > graphene::app::login_api::get_available_api_sets ( ) const

Retrieve a list of API sets that the user has access to.

Definition at line 108 of file api.cpp.

◆ get_config()

application_options graphene::app::login_api::get_config ( ) const

Retrieve configured application options.

Note
It requires the user to be logged in and have access to at least one API set other than login_api.

Definition at line 101 of file api.cpp.

◆ get_info()

string graphene::app::login_api::get_info ( ) const

Retrive the node info string configured by the node operator.

Definition at line 96 of file api.cpp.

◆ history()

fc::api< history_api > graphene::app::login_api::history ( )

Retrieve the history API set.

Definition at line 288 of file api.cpp.

◆ is_database_api_allowed()

bool graphene::app::login_api::is_database_api_allowed ( ) const

Check whether database_api is allowed, not reflected.

Returns
true if database_api is allowed, false otherwise

Definition at line 113 of file api.cpp.

◆ login()

variant graphene::app::login_api::login ( const optional< string > &  user,
const optional< string > &  password 
)

Authenticate to the RPC server, or retrieve the API set ID of the login API set.

Parameters
userUsername to login with, optional
passwordPassword to login with, optional
Returns
true if to authenticate and logged in successfully, false if to authenticate and failed to log in, or the API set ID if to retrieve it
Note
Provide both user and password to authenticate, or provide none of them (or null without quotes) to retrieve the API set ID of the login API set.
This is called automatically for authentication when a HTTP or WebSocket connection is established, assuming credentials are provided with HTTP Basic authentication headers.
When trying to authenticate again, even if failed to log in, already allocated API set IDs are still accessible.

Definition at line 56 of file api.cpp.

◆ logout()

bool graphene::app::login_api::logout ( )

Log out.

Returns
false
Note
Already allocated API set IDs are still accessible after calling this.

Definition at line 87 of file api.cpp.

◆ network_broadcast()

fc::api< network_broadcast_api > graphene::app::login_api::network_broadcast ( )

Retrieve the network broadcast API set.

Definition at line 243 of file api.cpp.

◆ network_node()

fc::api< network_node_api > graphene::app::login_api::network_node ( )

Retrieve the network node API set.

Definition at line 265 of file api.cpp.

◆ orders()

fc::api< orders_api > graphene::app::login_api::orders ( )

Retrieve the orders API set.

Definition at line 321 of file api.cpp.


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