Replies: 5 comments 5 replies
-
|
Hi @lombao, correct request: |
Beta Was this translation helpful? Give feedback.
-
|
sorry about the username typo, I know about the case, that is NOT the problem. |
Beta Was this translation helpful? Give feedback.
-
|
Sorry, correction, my bad The problem happens when using endpoints, what I missed is that I have an endpoint defined like { In the myep.js I capture the request and , removing all unneeded line I have something like So I can compare what is requested and what is returned, and both are correct, the result contains the correct userName. So inside teh myep.js all is correct But then when I do a curl like https://${OPENIDM_SRV}/openidm/endpoint/myep/managed/user/71610169-61a9-4783-b20e-5631c94bbf3e?_fields=description,userName,givenName,sn,manager,manager/userName the output is wrong !!!! { But now, if I use a "direct" curl query withoyut using the custom endpoint https://${OPENIDM_SRV}/openidm/managed/user/71610169-61a9-4783-b20e-5631c94bbf3e?_fields=description,userName,givenName,sn,manager,manager/sn,manager/_id,manager/userName,manager/givenName,manage the output is completely correct !!! Please note that as I said in the myep.js custom endpoint I have logs to show how the request arrives and what is the openidm.read result. here it is for the previous queries ( some bits were edited ) WARNING: Method Read IDMUI REQUEST {} ::: [ The relevant code in the myep.js that dumps these logs is So, the title of this issue is wrong, sorry, my bad, the issue seems to be in "something" when endpoints are used, which I cannot figure out what. |
Beta Was this translation helpful? Give feedback.
-
|
So, now I am "with a certain moderately" conviction that there is some bug in the https://github.com/OpenIdentityPlatform/OpenIDM/tree/master/openidm-customendpoint or any associated component in such a way that when using endpoints if an answer contains "someattributename, rel/someattributename" , if the "someattributename" happens to have the same, the reply is flattened. This should be reproducible with the default user object, because the "manager" relationship is a rel to the same user object, they will share the same attribute names, so , imagine that I make a query that wants to retrieve the givenNamer of both, a user, and its manager, the requested fields will be like "givenName,manager/givenName".. such query if it goes trought a custom endpoint will get "flattened" and the reply will wrongly mixup the givenName of the user and the givenName of the manager. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
I am uncertain on how to classify this. My apologies in advance if I missed something in the doc, but I would have assume that the reply of both internal openidm.read and REST api should be basically the same
In the ast version 7.0.2 of openidm I am seeing the following
If I use CURL to get a fields like "_fields=username,manager/userName"... then I get the expected response
{ "_id":"...." "userName": The right username .. "manager" { .... "userName": " Username of the manager" } }But if I request the same using openidm.read , the reply is like
{ "_id": "the correct id as before" "userName": The username of the Manager !!!!!!! "manager" { ..... } }It is like when using openidm.read there is a clash or problem when using "/"
Is it a bug ? Is it expected behaviour ?
Beta Was this translation helpful? Give feedback.
All reactions