Closed
Bug 998953
Opened 11 years ago
Closed 11 years ago
User.get with token parameter return with error
Categories
(Bugzilla :: WebService, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1001462
People
(Reporter: Frank, Unassigned)
Details
Use the xmlrpc web service interface with the following request
User.get with the two parameters id (in my case new Integer[] { 1, 2 }) and the token parameter (value from the User.login response)
results in the following error "Logged-out users cannot use the "ids" or "match" arguments to this" (I can reproduce this with Bugzilla 4.5.3, 4.5.4 and trunk)
When I run the same source with Bugzilla 4.5.2 I get the two user in the response.
Comment 1•11 years ago
|
||
(In reply to Frank Becker from comment #0)
> Use the xmlrpc web service interface with the following request
>
> User.get with the two parameters id (in my case new Integer[] { 1, 2 }) and
> the token parameter (value from the User.login response)
>
> results in the following error "Logged-out users cannot use the "ids" or
> "match" arguments to this" (I can reproduce this with Bugzilla 4.5.3, 4.5.4
> and trunk)
>
> When I run the same source with Bugzilla 4.5.2 I get the two user in the
> response.
Does it work properly if you use 'Bugzilla_token' as the key name for XMLRPC/JSONRPC calls?
'token' is a shortcut that is only relevant for REST calls as detailed in the user docs.
http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Server/REST.html#AUTHENTICATION
http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService.html#LOGGING_IN
Flags: needinfo?(Frank)
Reporter | ||
Comment 2•11 years ago
|
||
(In reply to David Lawrence [:dkl] from comment #1)
> (In reply to Frank Becker from comment #0)
> > Use the xmlrpc web service interface with the following request
> >
> > User.get with the two parameters id (in my case new Integer[] { 1, 2 }) and
> > the token parameter (value from the User.login response)
> >
> > results in the following error "Logged-out users cannot use the "ids" or
> > "match" arguments to this" (I can reproduce this with Bugzilla 4.5.3, 4.5.4
> > and trunk)
> >
> > When I run the same source with Bugzilla 4.5.2 I get the two user in the
> > response.
>
> Does it work properly if you use 'Bugzilla_token' as the key name for
> XMLRPC/JSONRPC calls?
> 'token' is a shortcut that is only relevant for REST calls as detailed in
> the user docs.
>
> http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Server/REST.
> html#AUTHENTICATION
> http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService.
> html#LOGGING_IN
Thanks, when I use 'Bugzilla_token' instead of 'token' all is OK. Maybe the Documentation can be more clear.
in http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/User.html#login I found:
Returns
On success, a hash containing two items, id, the numeric id of the user that was logged in, and a token which can be passed in the parameters as authentication in other calls. The token can be sent along with any future requests to the webservice, for the duration of the session, i.e. till User.logout is called.
So I use login and password as parameters and for the result I use id and token and pass it with the same name to all other requests. For Bugzilla 4.4.4 this is OK tu use token but for 4.5.4 I must use Bugzilla_token
Flags: needinfo?(Frank)
Comment 3•11 years ago
|
||
This will be fixed properly when bug 1001462 is released with the next version of Bugzilla.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•