MCPcopy Create free account
hub / github.com/3rdparty/libprocess / foreachpair

Function foreachpair

src/jwt_authenticator.cpp:118–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116 }
117
118 foreachpair (
119 const string& key,
120 const JSON::Value& value,
121 jwt->payload.values) {
122 // Calling 'stringify' on a 'JSON::String' would result in a quoted
123 // string. Hence this case is treated differently.
124 if (value.is<JSON::String>()) {
125 principal.claims[key] = value.as<JSON::String>().value;
126 } else {
127 principal.claims[key] = stringify(value);
128 }
129 }
130
131 result.principal = principal;
132 return result;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected