Needs work
Project:
Web service client
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Nov 2013 at 21:16 UTC
Updated:
2 Jul 2014 at 14:02 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dashohoxha commentedComment #2
dashohoxha commentedThe patch needs to be reviewed and applied.
Comment #3
dashohoxha commentedThis patch is so simple that it can't be wrong. Also I have tested it (I am using it on my project). The required patch on http_client has also been applied. So, why not apply and commit this patch?
Comment #4
dman commentedGood point. I agree this can't be wrong.
I'm active in some wsclient stuff today, and would love to put this in... but would also like to test...
Are you able to give me an example to run against? I'm hoping to get the Google APIs (which have switched to OAuth) up and running again under WSClient this week, so if I could add a working example to the docs that would be the sweetest thing ever!
Comment #5
dashohoxha commentedI don't have an example using it against Google or something. I use it like this:
And then something like this:
I am not sure whether it can be adopted easily for Google.
Comment #6
dman commentedThanks heaps, that is exactly the sort of "How to use this in the real world" doc I was looking for.
Great!
So I went to see if I could apply this immediately..
HOWEVER, so it depends on #1285310: Authentication settings in the UI first ... well that's OK if they re so related.
I've attached the combined patch...
BUT it looks like that other issue was stalled waiting for a UI to be exposed. :-(
and yeah, variable_get('wsclient_httpauth_username') isn't sustainable going forward. Damn.
And for now, the new oauth method added here doesn't do a UI EITHER. Blast.
That's sorta pretty important, given Klausi's decision "This issue is about making HTTP Basic Auth configurable in the UI"
Hm.
Options:
A: stall until we get a UI up? Hopefully at least combine the two threads here because it's a pain running both that are interdependant
B: Just push these two api-level improvements in and then layer on the UI in a second round? Even so, the variable_get method sucks and would have to be removed again.
Neither makes me happy.
C: Just build on the UI now today and get one largish patch. It won't be terrible, as it's not touching things that need too much revision.
Just doing that is the only way I can break this deadlock without lots of to-and-fro.
D: Put this feature into a small -dev branch on the repo to share until it's settled?
Comment #7
dman commentedNeeds work as it's blocked by [#7657727-15] - requires that one to land first AND needs a UI exposed really.
Comment #8
dashohoxha commentedI would say go on with B. I have applied these two patches and it was not the end of the world. Let's not make things more complicated then they are.
Comment #9
dman commentedThe variable_get there sucks as-is, ... and is it even used?
Also, it looks like it introduces an undocumented, un-checked and break-able dependency on HttpClientBasicAuth
[#7657727] is just not clean enough yet.
The patch you give here is fine, and that's what I looked at first. But as it requires that other broken stuff to be pulled in as well first, it's not cool.
Comment #10
dashohoxha commentedWhich 'variable_get' are you talking about? Is it not on the removed part?
And then, if nobody tries to use basic auth, it brings no harm, even if HttpClientBasicAuth is undefined.
Finally, you can comment out the lines about basic auth and leave only those related to oauth2 auth, and it will be fine.
Comment #11
dman commentedAh sorry, I see the variable_get stuff was indeed removed - the patch-diff I was looking at was showing it to me as a reverse with +, yep. My confusion.
Comment #12
dman commentedOK, I've done some testing, and can't see how this would introduce any regression. All my old tests work with it, so that's a start.
It's not got the UI there yet, but it lays a better foundation that the UI can actually expose now, so that's a safe step forward. I'm gonna go for that.
Comment #13
dashohoxha commentedI agree. It can be used from the code, without needing a UI, and the lack of the UI does not break anything.
Comment #14
dman commentedPushed http://drupalcode.org/project/wsclient.git/commit/85696e5cbe42729110c447... as a copmbined patch, as the second one repaired some issues with the first.
STILL NEEDS UI added to put this to bed.
Comment #15
jonhattanUpdated issue summary to fix links to the mentioned issues.