ChallengeResponse is NULL on the server side using GWT RESTLET client 2.1RC1 (Regression??)

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

ChallengeResponse is NULL on the server side using GWT RESTLET client 2.1RC1 (Regression??)

koma
RESTLET GWT 2.1RC1
RESTLET J2EE 2.1RC1

I have been banging my head over this but no mater what I try :

                ClientResource r = new ClientResource("/service" + UsersServiceProxy.URL);
                r.setChallengeResponse(ChallengeScheme.HTTP_BASIC, "scott", "tiger");
                r.setOnResponse(new Uniform() {
                        public void handle(Request request, Response response) {
                                if (response.getStatus().isSuccess()) {

                                } else {

                                }
                                Window.alert(response.getStatus().getDescription());
                        }
                });
                r.get();


On the server side no Challengeresponse is received. Debugging with wireshark shows that no "Authorization:" is sent over the wire.

Is this a regression of http://restlet.tigris.org/issues/show_bug.cgi?id=1060  ??


Koen

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2892504
Reply | Threaded
Open this post in threaded view
|

RE: ChallengeResponse is NULL on the server side using GWT RESTLET client 2.1RC1 (Regression??)

koma
Using Chrome development tools I can however see that the XHR request is sent to :

http://user1:secret@127.0.1.1:8888/service/user

so here, username/password are passed to the server but not as authentication header ?
How can I get access to these server side ?

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2892519
Reply | Threaded
Open this post in threaded view
|

RE: ChallengeResponse is NULL on the server side using GWT RESTLET client 2.1RC1 (Regression??)

koma
Reply | Threaded
Open this post in threaded view
|

RE: ChallengeResponse is NULL on the server side using GWT RESTLET client 2.1RC1 (Regression??)

koma
In class GwtHttpClientHelper, this piece of code passes the challengeresponse to the GWT request builder.
But it does not build a HTTP Authorization header !!


The implementation for GWT RequestBuilder is to insert username:password in the URL.


    public ClientCall create(Request request) {
        GwtClientCall result = null;

        try {
            result = new GwtClientCall(this, request.getMethod().toString(),
                    request.getResourceRef().toString(), request
                            .isEntityAvailable());

            // If a challenge response is provided,
            // update the GWT request builder
            if (request.getChallengeResponse() != null) {
                result.getRequestBuilder().setUser(
                        request.getChallengeResponse().getIdentifier());
                result.getRequestBuilder().setPassword(
                        String.valueOf(request.getChallengeResponse()
                                .getSecret()));
            }

        } catch (Exception ioe) {
            System.err.println("Unable to create the HTTP client call");
        }

        return result;

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2892888
Reply | Threaded
Open this post in threaded view
|

RE: ChallengeResponse is NULL on the server side using GWT RESTLET client 2.1RC1 (Regression??)

koma
With the code in attached zip file setup as super-source in my GWT project, I can have Basic AUTH working

<super-source path="authbugfix" />


Is this a regression ??


I am probably a whiner again, but talking to the walls starts to get annoying very fast.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2892910

fix-basic-auth.zip (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ChallengeResponse is NULL on the server side using GWT RESTLET client 2.1RC1 (Regression??)

Tim Peierls
If you look back over the history of this mailing list, you'll see that it sometimes takes the Restlet folks several days to catch up. Silence does not mean dismissal.

--tim

On Tue, Dec 13, 2011 at 6:38 AM, Koen Maes <[hidden email]> wrote:
With the code in attached zip file setup as super-source in my GWT project, I can have Basic AUTH working

<super-source path="authbugfix" />


Is this a regression ??


I am probably a whiner again, but talking to the walls starts to get annoying very fast.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2892910

Reply | Threaded
Open this post in threaded view
|

RE: ChallengeResponse is NULL on the server side using GWT RESTLET client 2.1RC1 (Regression??)

jlouvel
Administrator

Hi Koen,

 

Sorry for the delay, we are extremely busy right now, preparing exciting Restlet related news including finishing “Restlet in Action” book.

 

Regarding your message, you found a bug. I was initially surprised as nobody reported this so far and by the fact that GWT’s RequestBuilder prefers to send user/password as plain text in the URI rather than properly in an Authorization header… Weird.

 

Anyway, we’ll fix this for 2.1 RC2. Let’s keep track of this issue via this link (includes your patch, thx):

http://restlet.tigris.org/issues/show_bug.cgi?id=1060

 

Best regards,

Jerome

--

http://www.restlet.org

http://twitter.com/#!/jlouvel

 

 

 

 

De : [hidden email] [mailto:[hidden email]] De la part de Tim Peierls
Envoyé : mardi 13 décembre 2011 18:25
À : [hidden email]
Objet : Re: ChallengeResponse is NULL on the server side using GWT RESTLET client 2.1RC1 (Regression??)

 

If you look back over the history of this mailing list, you'll see that it sometimes takes the Restlet folks several days to catch up. Silence does not mean dismissal.

 

--tim

On Tue, Dec 13, 2011 at 6:38 AM, Koen Maes <[hidden email]> wrote:

With the code in attached zip file setup as super-source in my GWT project, I can have Basic AUTH working

<super-source path="authbugfix" />


Is this a regression ??


I am probably a whiner again, but talking to the walls starts to get annoying very fast.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2892910

 

Reply | Threaded
Open this post in threaded view
|

RE: ChallengeResponse is NULL on the server side using GWT RESTLET client 2.1RC1 (Regression??)

koma
Hi Jerome,

Sorry about my impatience.

The more I use your Restlet framework, the more I love it but it is hard to get feedback in general.

I think this has a lot to do with the archaic Tigris environment that the project lives in. This place is so nineties :-D. I have been reading about your plans to move to for instance GitHub but a community friendly env. like code.google.com is IMHO crucial to the success of a open source project. Not alone the project code quality and usefullnes determines the long term success, but the way a community is probably at leasst as important.

Koen

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2893465
Reply | Threaded
Open this post in threaded view
|

RE: ChallengeResponse is NULL on the server side using GWT RESTLET client 2.1RC1 (Regression??)

jlouvel
Administrator
Hi Koen,

Thanks for your message. I fully agree regarding the community environment
and the GitHub move should really help (currently, we are trying to have
them raise their size limits for the SVN import). We will also move to
Google Groups for the mailing list in 2012, but one step at a time :)

Best regards,
Jerome
--
http://www.restlet.org
http://twitter.com/#!/jlouvel


-----Message d'origine-----
De : Koen Maes [mailto:[hidden email]]
Envoyé : jeudi 15 décembre 2011 08:45
À : [hidden email]
Objet : RE: ChallengeResponse is NULL on the server side using GWT RESTLET
client 2.1RC1 (Regression??)

Hi Jerome,

Sorry about my impatience.

The more I use your Restlet framework, the more I love it but it is hard to
get feedback in general.

I think this has a lot to do with the archaic Tigris environment that the
project lives in. This place is so nineties :-D. I have been reading about
your plans to move to for instance GitHub but a community friendly env. like
code.google.com is IMHO crucial to the success of a open source project. Not
alone the project code quality and usefullnes determines the long term
success, but the way a community is probably at leasst as important.

Koen

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=28934
65

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2893550
Reply | Threaded
Open this post in threaded view
|

Re: ChallengeResponse is NULL on the server side using GWT RESTLET client 2.1RC1 (Regression??)

Thierry Boileau
In reply to this post by koma
Hello Koen,

Thanks a lot for reporting this issue and sorry for the delay. The fix (for HTTP_BASIC authentication)  is available in the 2.0 branch (next release : 2.0.11), and the current trunk (snapshot in a few hours, and 2.1rc2 in a few days).

Best regards,
Thierry Boileau


Hi Jerome,

Sorry about my impatience.

The more I use your Restlet framework, the more I love it but it is hard to get feedback in general.

I think this has a lot to do with the archaic Tigris environment that the project lives in. This place is so nineties :-D. I have been reading about your plans to move to for instance GitHub but a community friendly env. like code.google.com is IMHO crucial to the success of a open source project. Not alone the project code quality and usefullnes determines the long term success, but the way a community is probably at leasst as important.

Koen

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2893465