xrpld
Loading...
Searching...
No Matches
DepositAuthorized_test.cpp
1
2#include <test/jtx/Account.h>
3#include <test/jtx/Env.h>
4#include <test/jtx/amount.h>
5#include <test/jtx/credentials.h>
6#include <test/jtx/deposit.h>
7#include <test/jtx/flags.h>
8
9#include <xrpl/beast/unit_test/suite.h>
10#include <xrpl/json/json_value.h>
11#include <xrpl/protocol/ErrorCodes.h>
12#include <xrpl/protocol/Protocol.h> // IWYU pragma: keep
13#include <xrpl/protocol/SField.h>
14#include <xrpl/protocol/TxFlags.h>
15#include <xrpl/protocol/jss.h>
16
17#include <cassert>
18#include <cstdint>
19#include <string>
20#include <string_view>
21#include <vector>
22
23namespace xrpl::test {
24
26{
27public:
28 // Helper function that builds arguments for a deposit_authorized command.
29 static json::Value
31 jtx::Account const& source,
32 jtx::Account const& dest,
33 std::string const& ledger = "",
35 {
37 args[jss::source_account] = source.human();
38 args[jss::destination_account] = dest.human();
39 if (!ledger.empty())
40 args[jss::ledger_index] = ledger;
41
42 if (!credentials.empty())
43 {
44 auto& arr(args[jss::credentials] = json::ValueType::Array);
45 for (auto const& s : credentials)
46 arr.append(s);
47 }
48
49 return args;
50 }
51
52 // Helper function that verifies a deposit_authorized request was
53 // successful and returned the expected value.
54 void
56 {
57 json::Value const& results{result[jss::result]};
58 BEAST_EXPECT(results[jss::deposit_authorized] == authorized);
59 BEAST_EXPECT(results[jss::status] == jss::success);
60 }
61
62 // Test a variety of non-malformed cases.
63 void
65 {
66 testcase("Valid");
67 using namespace jtx;
68 Account const alice{"alice"};
69 Account const becky{"becky"};
70 Account const carol{"carol"};
71
72 Env env(*this);
73 env.fund(XRP(1000), alice, becky, carol);
74 env.close();
75
76 // becky is authorized to deposit to herself.
78 env.rpc(
79 "json",
80 "deposit_authorized",
81 depositAuthArgs(becky, becky, "validated").toStyledString()),
82 true);
83
84 // alice should currently be authorized to deposit to becky.
86 env.rpc(
87 "json",
88 "deposit_authorized",
89 depositAuthArgs(alice, becky, "validated").toStyledString()),
90 true);
91
92 // becky sets the DepositAuth flag in the current ledger.
93 env(fset(becky, asfDepositAuth));
94
95 // alice is no longer authorized to deposit to becky in current ledger.
97 env.rpc("json", "deposit_authorized", depositAuthArgs(alice, becky).toStyledString()),
98 false);
99 env.close();
100
101 // becky is still authorized to deposit to herself.
103 env.rpc(
104 "json",
105 "deposit_authorized",
106 depositAuthArgs(becky, becky, "validated").toStyledString()),
107 true);
108
109 // It's not a reciprocal arrangement. becky can deposit to alice.
111 env.rpc(
112 "json",
113 "deposit_authorized",
114 depositAuthArgs(becky, alice, "current").toStyledString()),
115 true);
116
117 // becky creates a deposit authorization for alice.
118 env(deposit::auth(becky, alice));
119 env.close();
120
121 // alice is now authorized to deposit to becky.
123 env.rpc(
124 "json",
125 "deposit_authorized",
126 depositAuthArgs(alice, becky, "closed").toStyledString()),
127 true);
128
129 // carol is still not authorized to deposit to becky.
131 env.rpc("json", "deposit_authorized", depositAuthArgs(carol, becky).toStyledString()),
132 false);
133
134 // becky clears the DepositAuth flag so carol becomes authorized.
135 env(fclear(becky, asfDepositAuth));
136 env.close();
137
139 env.rpc("json", "deposit_authorized", depositAuthArgs(carol, becky).toStyledString()),
140 true);
141
142 // alice is still authorized to deposit to becky.
144 env.rpc("json", "deposit_authorized", depositAuthArgs(alice, becky).toStyledString()),
145 true);
146 }
147
148 // Test malformed cases.
149 void
151 {
152 testcase("Errors");
153 using namespace jtx;
154 Account const alice{"alice"};
155 Account const becky{"becky"};
156
157 // Lambda that checks the (error) result of deposit_authorized.
158 auto const verifyErr = [this](
159 json::Value const& result,
160 char const* error,
161 ErrorCodeI code,
162 char const* errorMsg,
163 bool withLedgerFields = false) {
164 BEAST_EXPECT(result[jss::result][jss::status] == jss::error);
165 BEAST_EXPECT(result[jss::result][jss::error] == error);
166 BEAST_EXPECT(result[jss::result][jss::error_code] == code);
167 BEAST_EXPECT(result[jss::result][jss::error_message] == errorMsg);
168 BEAST_EXPECT(
169 result[jss::result].isMember(jss::ledger_current_index) == withLedgerFields);
170 BEAST_EXPECT(result[jss::result].isMember(jss::validated) == withLedgerFields);
171 };
172
173 Env env(*this);
174 {
175 // Missing source_account field.
176 json::Value args{depositAuthArgs(alice, becky)};
177 args.removeMember(jss::source_account);
178 json::Value const result{env.rpc("json", "deposit_authorized", args.toStyledString())};
179 verifyErr(result, "invalidParams", RpcInvalidParams, "Missing field 'source_account'.");
180 }
181 {
182 // Non-string source_account field.
183 json::Value args{depositAuthArgs(alice, becky)};
184 args[jss::source_account] = 7.3;
185 json::Value const result{env.rpc("json", "deposit_authorized", args.toStyledString())};
186 verifyErr(
187 result,
188 "invalidParams",
190 "Invalid field 'source_account', not a string.");
191 }
192 {
193 // Corrupt source_account field.
194 json::Value args{depositAuthArgs(alice, becky)};
195 args[jss::source_account] = "rG1QQv2nh2gr7RCZ!P8YYcBUKCCN633jCn";
196 json::Value const result{env.rpc("json", "deposit_authorized", args.toStyledString())};
197 verifyErr(result, "actMalformed", RpcActMalformed, "Account malformed.");
198 }
199 {
200 // Missing destination_account field.
201 json::Value args{depositAuthArgs(alice, becky)};
202 args.removeMember(jss::destination_account);
203 json::Value const result{env.rpc("json", "deposit_authorized", args.toStyledString())};
204 verifyErr(
205 result, "invalidParams", RpcInvalidParams, "Missing field 'destination_account'.");
206 }
207 {
208 // Non-string destination_account field.
209 json::Value args{depositAuthArgs(alice, becky)};
210 args[jss::destination_account] = 7.3;
211 json::Value const result{env.rpc("json", "deposit_authorized", args.toStyledString())};
212 verifyErr(
213 result,
214 "invalidParams",
216 "Invalid field 'destination_account', not a string.");
217 }
218 {
219 // Corrupt destination_account field.
220 json::Value args{depositAuthArgs(alice, becky)};
221 args[jss::destination_account] = "rP6P9ypfAmc!pw8SZHNwM4nvZHFXDraQas";
222 json::Value const result{env.rpc("json", "deposit_authorized", args.toStyledString())};
223 verifyErr(result, "actMalformed", RpcActMalformed, "Account malformed.");
224 }
225 {
226 // Request an invalid ledger.
227 json::Value const args{depositAuthArgs(alice, becky, "-1")};
228 json::Value const result{env.rpc("json", "deposit_authorized", args.toStyledString())};
229 verifyErr(
230 result,
231 "invalidParams",
233 "Invalid field 'ledger_index', not string or number.");
234 }
235 {
236 // Request a ledger that doesn't exist yet as a string.
237 json::Value const args{depositAuthArgs(alice, becky, "17")};
238 json::Value const result{env.rpc("json", "deposit_authorized", args.toStyledString())};
239 verifyErr(result, "lgrNotFound", RpcLgrNotFound, "ledgerNotFound");
240 }
241 {
242 // Request a ledger that doesn't exist yet.
243 json::Value args{depositAuthArgs(alice, becky)};
244 args[jss::ledger_index] = 17;
245 json::Value const result{env.rpc("json", "deposit_authorized", args.toStyledString())};
246 verifyErr(result, "lgrNotFound", RpcLgrNotFound, "ledgerNotFound");
247 }
248 {
249 // alice is not yet funded.
250 json::Value const args{depositAuthArgs(alice, becky)};
251 json::Value const result{env.rpc("json", "deposit_authorized", args.toStyledString())};
252 verifyErr(
253 result, "srcActNotFound", RpcSrcActNotFound, "Source account not found.", true);
254 }
255 env.fund(XRP(1000), alice);
256 env.close();
257 {
258 // becky is not yet funded.
259 json::Value const args{depositAuthArgs(alice, becky)};
260 json::Value const result{env.rpc("json", "deposit_authorized", args.toStyledString())};
261 verifyErr(
262 result,
263 "dstActNotFound",
265 "Destination account not found.",
266 true);
267 }
268 env.fund(XRP(1000), becky);
269 env.close();
270 {
271 // Once becky is funded try it again and see it succeed.
272 json::Value const args{depositAuthArgs(alice, becky)};
273 json::Value const result{env.rpc("json", "deposit_authorized", args.toStyledString())};
274 validateDepositAuthResult(result, true);
275 }
276 }
277
278 void
280 json::Value const& result,
281 jtx::Account const& src,
282 jtx::Account const& dst,
283 bool authorized,
284 std::vector<std::string> credentialIDs = {},
285 std::string_view error = "",
286 ErrorCodeI code = RpcSuccess,
287 std::string_view errorMessage = "")
288 {
289 BEAST_EXPECT(result[jss::status] == (authorized ? jss::success : jss::error));
290 if (result.isMember(jss::deposit_authorized))
291 BEAST_EXPECT(result[jss::deposit_authorized] == authorized);
292 if (authorized)
293 {
294 BEAST_EXPECT(
295 result.isMember(jss::deposit_authorized) &&
296 (result[jss::deposit_authorized] == true));
297 }
298
299 BEAST_EXPECT(result.isMember(jss::error) == !error.empty());
300 if (!error.empty())
301 {
302 BEAST_EXPECT(result[jss::error].asString() == error);
303 BEAST_EXPECT(result[jss::error_code] == code);
304 BEAST_EXPECT(result[jss::error_message].asString() == errorMessage);
305
306 bool const withLedgerFields = error == "badCredentials";
307 BEAST_EXPECT(result.isMember(jss::ledger_hash) == withLedgerFields);
308 BEAST_EXPECT(result.isMember(jss::ledger_index) == withLedgerFields);
309 BEAST_EXPECT(result.isMember(jss::validated) == withLedgerFields);
310 }
311
312 if (authorized)
313 {
314 BEAST_EXPECT(result[jss::source_account] == src.human());
315 BEAST_EXPECT(result[jss::destination_account] == dst.human());
316
317 for (unsigned i = 0; i < credentialIDs.size(); ++i)
318 BEAST_EXPECT(result[jss::credentials][i] == credentialIDs[i]);
319 }
320 else
321 {
322 BEAST_EXPECT(result[jss::request].isObject());
323
324 auto const& request = result[jss::request];
325 BEAST_EXPECT(request[jss::command] == jss::deposit_authorized);
326 BEAST_EXPECT(request[jss::source_account] == src.human());
327 BEAST_EXPECT(request[jss::destination_account] == dst.human());
328
329 for (unsigned i = 0; i < credentialIDs.size(); ++i)
330 BEAST_EXPECT(request[jss::credentials][i] == credentialIDs[i]);
331 }
332 }
333
334 void
336 {
337 testcase("Credentials");
338
339 using namespace jtx;
340
341 char const credType[] = "abcde";
342
343 Account const alice{"alice"};
344 Account const becky{"becky"};
345 Account const diana{"diana"};
346 Account const carol{"carol"};
347
348 Env env(*this);
349 env.fund(XRP(1000), alice, becky, carol, diana);
350 env.close();
351
352 // carol recognize alice
353 env(credentials::create(alice, carol, credType));
354 env.close();
355 // retrieve the index of the credentials
356 auto const jv = credentials::ledgerEntry(env, alice, carol, credType);
357 std::string const credIdx = jv[jss::result][jss::index].asString();
358
359 // becky sets the DepositAuth flag in the current ledger.
360 env(fset(becky, asfDepositAuth));
361 env.close();
362
363 // becky authorize any account recognized by carol to make a payment
364 env(deposit::authCredentials(becky, {{.issuer = carol, .credType = credType}}));
365 env.close();
366
367 {
368 testcase("deposit_authorized with credentials failure: empty array.");
369
370 auto args = depositAuthArgs(alice, becky, "validated");
371 args[jss::credentials] = json::ValueType::Array;
372
373 auto const jv = env.rpc("json", "deposit_authorized", args.toStyledString());
375 jv[jss::result],
376 alice,
377 becky,
378 false,
379 {},
380 "invalidParams",
382 "Invalid field 'credentials', not is non-empty array of CredentialID(hash256).");
383 }
384
385 {
386 testcase(
387 "deposit_authorized with credentials failure: not a string "
388 "credentials");
389
390 auto args = depositAuthArgs(alice, becky, "validated");
391 args[jss::credentials] = json::ValueType::Array;
392 args[jss::credentials].append(1);
393 args[jss::credentials].append(3);
394
395 auto const jv = env.rpc("json", "deposit_authorized", args.toStyledString());
397 jv[jss::result],
398 alice,
399 becky,
400 false,
401 {},
402 "invalidParams",
404 "Invalid field 'credentials', not an array of CredentialID(hash256).");
405 }
406
407 {
408 testcase(
409 "deposit_authorized with credentials failure: not a hex string "
410 "credentials");
411
412 auto args = depositAuthArgs(alice, becky, "validated");
413 args[jss::credentials] = json::ValueType::Array;
414 args[jss::credentials].append("hello world");
415
416 auto const jv = env.rpc("json", "deposit_authorized", args.toStyledString());
418 jv[jss::result],
419 alice,
420 becky,
421 false,
422 {"hello world"},
423 "invalidParams",
425 "Invalid field 'credentials', not an array of CredentialID(hash256).");
426 }
427
428 {
429 testcase(
430 "deposit_authorized with credentials failure: not a credential "
431 "index");
432
433 auto const args = depositAuthArgs(
434 alice,
435 becky,
436 "validated",
437 {
438 "0127AB8B4B29CCDBB61AA51C0799A8A6BB80B86A9899807C11ED576AF8516"
439 "473",
440 });
441
442 auto const jv = env.rpc("json", "deposit_authorized", args.toStyledString());
444 jv[jss::result],
445 alice,
446 becky,
447 false,
448 {
449 "0127AB8B4B29CCDBB61AA51C0799A8A6BB80B86A9899807C11ED576AF8516"
450 "473",
451 },
452 "badCredentials",
454 "credentials don't exist");
455 }
456
457 {
458 testcase(
459 "deposit_authorized with credentials failure: zero "
460 "credential index");
461
462 for (auto const& zero : {std::string("0"), std::string(64, '0')})
463 {
464 auto const args = depositAuthArgs(alice, becky, "validated", {zero});
465
466 auto const jv = env.rpc("json", "deposit_authorized", args.toStyledString());
468 jv[jss::result],
469 alice,
470 becky,
471 false,
472 {zero},
473 "badCredentials",
475 "credentials don't exist");
476 }
477 }
478
479 {
480 testcase(
481 "deposit_authorized with credentials not authorized: "
482 "credential not accepted");
483 auto const jv = env.rpc(
484 "json",
485 "deposit_authorized",
486 depositAuthArgs(alice, becky, "validated", {credIdx}).toStyledString());
488 jv[jss::result],
489 alice,
490 becky,
491 false,
492 {credIdx},
493 "badCredentials",
495 "credentials aren't accepted");
496 }
497
498 // alice accept credentials
499 env(credentials::accept(alice, carol, credType));
500 env.close();
501
502 {
503 testcase("deposit_authorized with duplicates in credentials");
504 auto const jv = env.rpc(
505 "json",
506 "deposit_authorized",
507 depositAuthArgs(alice, becky, "validated", {credIdx, credIdx}).toStyledString());
509 jv[jss::result],
510 alice,
511 becky,
512 false,
513 {credIdx, credIdx},
514 "badCredentials",
516 "duplicates in credentials");
517 }
518
519 {
520 static std::vector<std::string> const kCredIds = {
521 "18004829F915654A81B11C4AB8218D96FED67F209B58328A72314FB6EA288BE4",
522 "28004829F915654A81B11C4AB8218D96FED67F209B58328A72314FB6EA288BE4",
523 "38004829F915654A81B11C4AB8218D96FED67F209B58328A72314FB6EA288BE4",
524 "48004829F915654A81B11C4AB8218D96FED67F209B58328A72314FB6EA288BE4",
525 "58004829F915654A81B11C4AB8218D96FED67F209B58328A72314FB6EA288BE4",
526 "68004829F915654A81B11C4AB8218D96FED67F209B58328A72314FB6EA288BE4",
527 "78004829F915654A81B11C4AB8218D96FED67F209B58328A72314FB6EA288BE4",
528 "88004829F915654A81B11C4AB8218D96FED67F209B58328A72314FB6EA288BE4",
529 "98004829F915654A81B11C4AB8218D96FED67F209B58328A72314FB6EA288BE4",
530 };
531 assert(kCredIds.size() > kMaxCredentialsArraySize);
532
533 testcase("deposit_authorized too long credentials");
534 auto const jv = env.rpc(
535 "json",
536 "deposit_authorized",
537 depositAuthArgs(alice, becky, "validated", kCredIds).toStyledString());
539 jv[jss::result],
540 alice,
541 becky,
542 false,
543 kCredIds,
544 "invalidParams",
546 "Invalid field 'credentials', not array too long.");
547 }
548
549 {
550 testcase("deposit_authorized with credentials");
551 auto const jv = env.rpc(
552 "json",
553 "deposit_authorized",
554 depositAuthArgs(alice, becky, "validated", {credIdx}).toStyledString());
555 checkCredentialsResponse(jv[jss::result], alice, becky, true, {credIdx});
556 }
557
558 {
559 // diana recognize becky
560 env(credentials::create(becky, diana, credType));
561 env.close();
562 env(credentials::accept(becky, diana, credType));
563 env.close();
564
565 // retrieve the index of the credentials
566 auto jv = credentials::ledgerEntry(env, becky, diana, credType);
567 std::string const credBecky = jv[jss::result][jss::index].asString();
568
569 testcase("deposit_authorized account without preauth");
570 jv = env.rpc(
571 "json",
572 "deposit_authorized",
573 depositAuthArgs(becky, alice, "validated", {credBecky}).toStyledString());
574 checkCredentialsResponse(jv[jss::result], becky, alice, true, {credBecky});
575 }
576
577 {
578 // carol recognize diana
579 env(credentials::create(diana, carol, credType));
580 env.close();
581 env(credentials::accept(diana, carol, credType));
582 env.close();
583 // retrieve the index of the credentials
584 auto jv = credentials::ledgerEntry(env, alice, carol, credType);
585 std::string const credDiana = jv[jss::result][jss::index].asString();
586
587 // alice try to use credential for different account
588 jv = env.rpc(
589 "json",
590 "deposit_authorized",
591 depositAuthArgs(becky, alice, "validated", {credDiana}).toStyledString());
593 jv[jss::result],
594 becky,
595 alice,
596 false,
597 {credDiana},
598 "badCredentials",
600 "credentials doesn't belong to the root account");
601 }
602
603 {
604 testcase("deposit_authorized with expired credentials");
605
606 // check expired credentials
607 char const credType2[] = "random";
608 std::uint32_t const x =
609 env.current()->header().parentCloseTime.time_since_epoch().count() + 40;
610
611 // create credentials with expire time 40s
612 auto jv = credentials::create(alice, carol, credType2);
613 jv[sfExpiration.jsonName] = x;
614 env(jv);
615 env.close();
616 env(credentials::accept(alice, carol, credType2));
617 env.close();
618 jv = credentials::ledgerEntry(env, alice, carol, credType2);
619 std::string const credIdx2 = jv[jss::result][jss::index].asString();
620
621 // becky sets the DepositAuth flag in the current ledger.
622 env(fset(becky, asfDepositAuth));
623 env.close();
624
625 // becky authorize any account recognized by carol to make a payment
626 env(deposit::authCredentials(becky, {{.issuer = carol, .credType = credType2}}));
627 env.close();
628
629 {
630 // this should be fine
631 jv = env.rpc(
632 "json",
633 "deposit_authorized",
634 depositAuthArgs(alice, becky, "validated", {credIdx2}).toStyledString());
635 checkCredentialsResponse(jv[jss::result], alice, becky, true, {credIdx2});
636 }
637
638 // increase timer by 20s
639 env.close();
640 env.close();
641 {
642 // now credentials expired
643 jv = env.rpc(
644 "json",
645 "deposit_authorized",
646 depositAuthArgs(alice, becky, "validated", {credIdx2}).toStyledString());
647
649 jv[jss::result],
650 alice,
651 becky,
652 false,
653 {credIdx2},
654 "badCredentials",
656 "credentials are expired");
657 }
658 }
659 }
660
661 void
662 run() override
663 {
664 testValid();
665 testErrors();
667 }
668};
669
670BEAST_DEFINE_TESTSUITE(DepositAuthorized, rpc, xrpl);
671
672} // namespace xrpl::test
A testsuite class.
Definition suite.h:52
TestcaseT testcase
Memberspace for declaring test cases.
Definition suite.h:155
Represents a JSON value.
Definition json_value.h:121
Value removeMember(char const *key)
Remove and return the named member.
std::string toStyledString() const
Value & append(Value const &value)
Append value to array at the end.
bool isMember(char const *key) const
Return true if the object has a member named key.
void checkCredentialsResponse(json::Value const &result, jtx::Account const &src, jtx::Account const &dst, bool authorized, std::vector< std::string > credentialIDs={}, std::string_view error="", ErrorCodeI code=RpcSuccess, std::string_view errorMessage="")
static json::Value depositAuthArgs(jtx::Account const &source, jtx::Account const &dest, std::string const &ledger="", std::vector< std::string > const &credentials={})
void validateDepositAuthResult(json::Value const &result, bool authorized)
Immutable cryptographic account descriptor.
Definition jtx/Account.h:21
std::string const & human() const
Returns the human readable public key.
A transaction testing environment.
Definition Env.h:161
bool close(NetClock::time_point closeTime, std::optional< std::chrono::milliseconds > consensusDelay=std::nullopt)
Close and advance the ledger.
Definition Env.cpp:133
void fund(bool setDefaultRipple, STAmount const &amount, Account const &account)
Definition Env.cpp:323
json::Value rpc(unsigned apiVersion, std::unordered_map< std::string, std::string > const &headers, std::string const &cmd, Args &&... args)
Execute an RPC command.
Definition Env.h:1058
std::shared_ptr< OpenView const > current() const
Returns the current ledger.
Definition Env.h:377
T empty(T... args)
@ Array
array value (ordered list)
Definition json_value.h:32
@ Object
object value (collection of name/value pairs).
Definition json_value.h:33
The api_version numbers this server serves.
Definition ApiVersion.h:26
json::Value accept(jtx::Account const &subject, jtx::Account const &issuer, std::string_view credType)
Definition creds.cpp:29
json::Value create(jtx::Account const &subject, jtx::Account const &issuer, std::string_view credType)
Definition creds.cpp:16
json::Value ledgerEntry(jtx::Env &env, jtx::Account const &subject, jtx::Account const &issuer, std::string_view credType)
Definition creds.cpp:56
json::Value authCredentials(jtx::Account const &account, std::vector< AuthorizeCredentials > const &auth)
Definition deposit.cpp:38
json::Value auth(Account const &account, Account const &auth)
Preauthorize for deposit.
Definition deposit.cpp:16
XrpT const XRP
Converts to XRP Issue or STAmount.
Definition amount.cpp:92
json::Value fclear(Account const &account, std::uint32_t off)
Remove account flag.
Definition flags.h:110
json::Value fset(Account const &account, std::uint32_t on, std::uint32_t off=0)
Add and/or remove flag.
Definition flags.cpp:15
BEAST_DEFINE_TESTSUITE(AMMClawback, app, xrpl)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
ErrorCodeI
Definition ErrorCodes.h:23
@ RpcDstActNotFound
Definition ErrorCodes.h:88
@ RpcBadCredentials
Definition ErrorCodes.h:135
@ RpcLgrNotFound
Definition ErrorCodes.h:55
@ RpcSuccess
Definition ErrorCodes.h:27
@ RpcActMalformed
Definition ErrorCodes.h:73
@ RpcInvalidParams
Definition ErrorCodes.h:67
@ RpcSrcActNotFound
Definition ErrorCodes.h:105
static bool authorized(Port const &port, std::map< std::string, std::string > const &h)
constexpr std::size_t kMaxCredentialsArraySize
The maximum number of credentials can be passed in array.
Definition Protocol.h:281
T size(T... args)