Rest services, user creation response with password=null

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Rest services, user creation response with password=null

HugoCerdeira
Hi,

When I create a User via the restfull api on syncope-core, I get the following response:

"entity": 
{
"@class": "org.apache.syncope.common.lib.to.UserTO",
"creator": "admin",
"creationDate": "2017-05-11T15:01:53.159+0000",
"lastModifier": "admin",
"lastChangeDate": "2017-05-11T15:01:53.159+0000",
"key": "d968db6d-4ab8-4716-a8db-6d4ab8c716b6",
"type": "USER",
"realm": "<a title="Click to insert into URL field" response-anchor="" add-root-url="" href="chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo/" style="color: rgb(25, 118, 210);">/",
"status": "created",
"password": null,

..........irrelevant.......​


but as you can see I get password= null, even tho I sent a password when creating the user, any ideia on how i can get it to show on the response?

Thanks!

Hugo Cerdeira.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rest services, user creation response with password=null

mdisabatino



Il 11/05/2017 17:09, Hugo Cerdeira ha scritto:
Hi,

When I create a User via the restfull api on syncope-core, I get the following response:

"entity": 
{
"@class": "org.apache.syncope.common.lib.to.UserTO",
"creator": "admin",
"creationDate": "2017-05-11T15:01:53.159+0000",
"lastModifier": "admin",
"lastChangeDate": "2017-05-11T15:01:53.159+0000",
"key": "d968db6d-4ab8-4716-a8db-6d4ab8c716b6",
"type": "USER",
"realm": "<a moz-do-not-send="true" title="Click to insert into URL field" response-anchor="" add-root-url="" href="chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo/" style="color: rgb(25, 118, 210);">/",
"status": "created",
"password": null,

..........irrelevant.......​


but as you can see I get password= null, even tho I sent a password when creating the user, any ideia on how i can get it to show on the response?

By default syncope doesn't return the password. If you want to read the password field you must set return.password.value (configuration parameter) to true.

Regards
M

Thanks!

Hugo Cerdeira.

-- 
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 0859111173
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rest services, user creation response with password=null

HugoCerdeira
This post was updated on .
Hi,

Thanks for the quick reply!

That worked and i can now see the password on the response, but when I'm trying to the provisioning of the User I receive null on the password field, on my groovy script used by my connector. I do receive the other fields like username and plain attrs so i guess the error isnt on the script/provisioning rules, any clue whats going on?

edit:
if i set the password as mandatory on provisioning mapping i guess this error while trying to the propagation:
"propagationStatuses": [
  {
     "beforeObj": null,
     "afterObj": null,
     "resource": "ofbizUsersPropagation",
     "status": "FAILURE",
     "failureReason": "Not attempted because there are mandatory attributes without value(s): [password]"
}



Thanks,
Hugo Cerdeira.
Loading...