Re: Intercept basic authentication popup

2011-06-30 Thread khiem nguyen
i dont think u can do this at js in dom. browser handles this automatically
when it sees the http-auth-required header before your js-code gets it. u'll
need an anternative approach for this



On Wed, Jun 29, 2011 at 7:52 PM, objectuser kevin.k.le...@gmail.com wrote:

 I'm not an expert in this by any means (and certainly don't know your
 requirements), but it seems like basic auth is fundamentally incompatible
 with a GWT app (or at least the portion you describe).

 I think a more compatible model would be to rely on something like cookies,
 have a particular service that does not require authentication, and then
 check the response to that to see if the user is authenticated.  Then you
 can put access control on all your other services to ensure authenticated
 access.

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-web-toolkit/-/HrYT7hSLoX0J.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Intercept basic authentication popup

2011-06-29 Thread koma
Not sure how this helps ?
Should I make a RPC call to the JSON service before each JSONP call ?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/r8vtU9l35bkJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Intercept basic authentication popup

2011-06-29 Thread objectuser
I'm not an expert in this by any means (and certainly don't know your 
requirements), but it seems like basic auth is fundamentally incompatible 
with a GWT app (or at least the portion you describe).

I think a more compatible model would be to rely on something like cookies, 
have a particular service that does not require authentication, and then 
check the response to that to see if the user is authenticated.  Then you 
can put access control on all your other services to ensure authenticated 
access.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/HrYT7hSLoX0J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Intercept basic authentication popup

2011-06-15 Thread koma
same prob.

Firefox supports something like *mozBackgroundRequest*
*Not sure how to set this property for a JSONP call though. Even then, only 
works for FF, chromium has a ticket 
openhttp://code.google.com/p/chromium/issues/detail?id=31582, 
found nothing about IE.
*
*
*
*
*
*I'd like to save my credentials locally (Gadget preferences) but the Basic 
auth dialog makes this impossible.*

*
*

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/oy6rOq9CjN0J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Intercept basic authentication popup

2011-06-15 Thread Juan Pablo Gardella
If you use gwt-rpc, make a default asyncallback like this:

public abstract class DefaultAsyncCallbackT implements
com.google.gwt.user.client.rpc.AsyncCallbackT {

private static final char flag = '0';

@Override
public void onFailure(Throwable e) {
 if (isUnAuthenticatedUser(e)) showLogin();
}

}

And use everywhere.

2011/6/15 koma k...@koma.be

 same prob.

 Firefox supports something like *mozBackgroundRequest*
 *Not sure how to set this property for a JSONP call though. Even then,
 only works for FF, chromium has a ticket 
 openhttp://code.google.com/p/chromium/issues/detail?id=31582,
 found nothing about IE.
 *
 *
 *
 *
 *
 *I'd like to save my credentials locally (Gadget preferences) but the
 Basic auth dialog makes this impossible.*

 *
 *

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-web-toolkit/-/oy6rOq9CjN0J.

 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Intercept basic authentication popup

2011-06-14 Thread Vinicius Carvalho
Hi there!

Is it possible to intercept the basic auth login that pops up on a
browser? My problem is that I have a basic auth set on server side for
all my services (RPC and REST).

When I try to invoke a service and the user is not authenticated,
before I get the chance (the async callback gets called), the window
pops up.

What I would like (I know i could do this using either form, or spring
security for instance) is to intercept the return from the server that
asks for the authorization credentials, and then provide my
credentials on the requestbuilder by setting username/password.

Is this possible?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.