Gilad,
You can have multiple RequestFactoryServlets. check out the example below.
If you look at it closely, I have a different url mapping. You will have
to define individual RequestTransports to be associated with the
url-mapping in your client.
Also, you will have to controll operations exposed by each of the
requestFactories in your client. You can always have a base factory
where you can provide common functions and move only the secured ones to
SecuredRequestFactory
What I would recommend with this approach is, before using the
RequestFactories have a check in your code to determine if a user is
loggedIn. If logged in use the secure servlet for all requests.
example ;
*web.xml *
<filter>
<filter-name>AuthFilter</filter-name>
<filter-class>com.example.server.gae.GaeAuthFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>AuthFilter</filter-name>
<servlet-name>authRequestFactory</servlet-name>
</filter-mapping>
<servlet>
<servlet-name>authRequestFactory</servlet-name>
<servlet-class>com.google.web.bindery.requestfactory.server.RequestFactoryServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>unAuthRequestFactory</servlet-name>
<servlet-class>com.google.web.bindery.requestfactory.server.RequestFactoryServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>unAuthRequestFactory</servlet-name>
<url-pattern>/unsignedRequest</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>authRequestFactory</servlet-name>
<url-pattern>/signedRequest</url-pattern>
</servlet-mapping>
*client*
*//AuthenticatedRequestTransport*
public class AuthenticatedRequestTransport extends DefaultRequestTransport {
/**
* default constructor.
*
*/
public AuthenticatedRequestTransport() {
super();
//set the url
String requestURL = GWT.getHostPageBaseURL() + "signedRequest";
setRequestUrl(requestURL);
}
}
*//Un-Authenticated Request*
public class UnAuthenticatedRequestTransport extends
DefaultRequestTransport {
public UnAuthenticatedRequestTransport() {
super();
//set the url
String requestURL = GWT.getHostPageBaseURL() + "unsignedRequest";
setRequestUrl(requestURL);
}
}
regards
Ashwin
On Thursday 16 February 2012 08:29:53 PM IST, Gilad Egozi wrote:
Is it possible to have this? And how can this be achieved?
The motivation - I want one secured (SSL) service for user-
provisioning (passwords...), and one non-secured.
Thanks,
Gilad.
--
You received this message because you are subscribed to the Google Groups "Google
Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.