Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
rpc::credentials Namespace Reference

Helpers for validating and parsing credentials used in RPC requests. More...

Functions

bool checkExpired (xrpl::SLE const &sleCred, xrpl::LedgerHeader const &ledger)
 Check if credential is expired.
std::set< std::pair< xrpl::AccountID, xrpl::Slice > > createAuthCredentials (xrpl::STArray const &in)
 Creates authentication credential field (which is a set of pairs of AccountID and Credential ID).
xrpl::STArray parseAuthorizeCredentials (boost::json::array const &jv)
 Parses each credential object and makes sure the credential type and values are correct.
std::expected< xrpl::STArray, Status > fetchCredentialArray (std::vector< xrpl::uint256 > const &credIDs, xrpl::AccountID const &srcAcc, BackendInterface const &backend, xrpl::LedgerHeader const &info, boost::asio::yield_context const &yield)
 Get Array of Credential objects.

Detailed Description

Helpers for validating and parsing credentials used in RPC requests.

Function Documentation

◆ checkExpired()

bool rpc::credentials::checkExpired ( xrpl::SLE const & sleCred,
xrpl::LedgerHeader const & ledger )

Check if credential is expired.

Parameters
sleCredThe credential to check
ledgerThe ledger to check the closed time of
Returns
true if credential not expired, false otherwise

◆ createAuthCredentials()

std::set< std::pair< xrpl::AccountID, xrpl::Slice > > rpc::credentials::createAuthCredentials ( xrpl::STArray const & in)

Creates authentication credential field (which is a set of pairs of AccountID and Credential ID).

Parameters
inThe array of Credential objects to check
Returns
Auth Credential array

◆ fetchCredentialArray()

std::expected< xrpl::STArray, Status > rpc::credentials::fetchCredentialArray ( std::vector< xrpl::uint256 > const & credIDs,
xrpl::AccountID const & srcAcc,
BackendInterface const & backend,
xrpl::LedgerHeader const & info,
boost::asio::yield_context const & yield )

Get Array of Credential objects.

Parameters
credIDsThe credential IDs to look up
srcAccThe Source Account
backendbackend interface
infoThe ledger header
yieldThe coroutine context
Returns
Array of credential objects, error if failed otherwise

◆ parseAuthorizeCredentials()

xrpl::STArray rpc::credentials::parseAuthorizeCredentials ( boost::json::array const & jv)

Parses each credential object and makes sure the credential type and values are correct.

Parameters
jvThe boost json array of credentials to parse
Returns
Array of credentials after parsing