Open simaxw opened 1 week ago
You can filter what you want exposed with setExpose.. https://api.cutelyst.org/classCutelyst_1_1ViewJson.html#ae94f43054d685f4b0fd348f1db09fe16 I myself don't actually use ViewJson as I prefer to just call c->response()->setJsonObjectBody({ {"foo", "bar" } });
about the duplicate values they are likely from the same source but maybe exposed with different Q_PROPERTIES, not sure woul need to investigate further
Hi dantti,
thank you for the quick reply.
Regarding the setExpose
: As far as I could see only the first level is checked and filtered. In case I have a JSON structure on a deeper level I have to take care of it myself I guess.
But the actual issue/question is: Why does serialization of AuthenticationUser
instance it return null even though you Q_DECLARE_METATYPE
'd it?
because it doesn't know how to serialize that to a json value
Hello,
I am running Cutelyst 4.3.0 and using the Authentication Plugin. So in my authentication route which is decorated like:
so, returns a JSON representation of the stash once I authenticate the user successfully using:
which works perfectly fine. However, since
c
is passed toauthenticate
, it is used to alter the stash which results in:This arises two questions:
AuthenticationUser
instance which fails and just returnsnull
. But even if it would succeed: Is that really desirable? Maybe the object from the store does not always match what we want to return to the client._c_session_values
and the realm name is present three times under different keys. Was this intended?