Helpers for validating and parsing credentials used in RPC requests.
More...
|
| 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.
|
Helpers for validating and parsing credentials used in RPC requests.
◆ checkExpired()
| bool rpc::credentials::checkExpired |
( |
xrpl::SLE const & | sleCred, |
|
|
xrpl::LedgerHeader const & | ledger ) |
Check if credential is expired.
- Parameters
-
| sleCred | The credential to check |
| ledger | The 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
-
| in | The 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
-
| credIDs | The credential IDs to look up |
| srcAcc | The Source Account |
| backend | backend interface |
| info | The ledger header |
| yield | The 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
-
| jv | The boost json array of credentials to parse |
- Returns
- Array of credentials after parsing