Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: How to setup Spring Security with GWT

  1. #11

    Default

    You should have a look at this project :
    http://code.google.com/p/gwt-incubator-lib

    There is a dedicated part for Spring Security integration using GWT-SL

  2. #12
    Join Date
    May 2009
    Posts
    5

    Default gwt-incubator-lib

    Do any one have a working sample of gwt-incubator-lib ?

  3. #13

    Default

    Quote Originally Posted by springworld View Post
    Do any one have a working sample of gwt-incubator-lib ?
    What kind of problem did you encounter ?
    I've already used it, successfully.

  4. #14
    Join Date
    May 2009
    Posts
    5

    Default

    Hi Delirii,
    Thanks for your reply.
    I am trying to implement Spring security in simple Greetings RPC application. I am getting struck with the login page and how the roles is being propogated from client side.
    Here are my questions
    1. What configurations you do in client side, inorder to get the role propogated?
    2. Are we going to add spring security related configuration in web.xml file?

    WOuld be nice if you can point me to a implemented sample.

    Thanks

  5. #15
    Join Date
    Aug 2009
    Posts
    14

    Default

    gwt-incubator-lib does not work with GWT 1.7 it seams...

  6. #16
    Join Date
    Aug 2009
    Posts
    5

    Default

    Quote Originally Posted by Insano View Post
    gwt-incubator-lib does not work with GWT 1.7 it seams...
    Second that. I was not able to get gwt-incubator-security-1.0.0-SNAPSHOT working with gwt 1.7.0

    It seems that all RPC calls try to call my service methods on the wrong object:

    Code:
    SEVERE: Exception while dispatching incoming RPC call
    java.lang.RuntimeException: java.lang.NoSuchMethodException: org.gwtwidgets.server.spring.hb4gwt.HB4GWTRPCServiceExporter.getItem()
    	at org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleExporterProcessingException(spring:GWTRPCServiceExporter.java):344)
    	at org.gwtwidgets.server.spring.GWTRPCServiceExporter.processCall(spring:GWTRPCServiceExporter.java):313)
    ...
    The getItem() method is actually defined in my RPC service interface and implementation and works fine when I remove gwt-incubator-security.

    My environment:

    Windows XP
    GWT 1.7.0
    Spring 2.5.6
    SpringSecurity 2.0.4

    Did anyone manage to get method level security working with GWT 1.7? Would love to see a working example...
    Thanks,

    Steve

  7. #17
    Join Date
    Aug 2009
    Posts
    14

    Default

    I am currently using
    • GWT 1.7
    • gwt-incubator-lib
    • EXT-GWT 2

    And noticed the following exception is being thrown when using GWTSecuredHandler:
    Code:
    [WARN] Exception while dispatching incoming RPC call
    com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: Type 'com.extjs.gxt.ui.client.data.BasePagingLoadConfig' was not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom field serializer.  For security purposes, this type will not be deserialized.
    This does not occur when using the GWTHandler.

    It seems that gwt-incubator-lib is not really usable at this stage. Is there no other alternative?

  8. #18
    Join Date
    Aug 2009
    Posts
    14

    Default

    Quote Originally Posted by greco View Post
    Try using this:

    Code:
    var invalidSession = function(){ window.location = '<%= request.getContextPath() %>/login.jsp'; };
    Ext.lib.Ajax.on('status:403', invalidSession );
    .
    This code is not returned though, what is returned is a code 200 with the source code of the login page.

  9. #19

    Default

    GWT incubator security lib has been updated to work with GWT 1.7.
    I'll give it a try.
    I do not use Gilaed in my case, nor GWT Ext, it may help.

  10. #20
    Join Date
    Aug 2009
    Posts
    5

    Default

    Quote Originally Posted by delirii View Post
    I do not use Gilaed in my case, nor GWT Ext, it may help.
    I think you're right. Gilead is what seems to cause the problem I'm facing:
    The gwt-incubator-security uses GWTRPCServiceExporter by default, whereas my RPC services are managed by HB4GWTRPCServiceExporter.

    I will try to replace GWTRPCServiceExporter references by HB4GWTRPCServiceExporter in the gwt-incubator-security code. If that doesn't work I will simply create a merged class which does the job of both :/

    If anyone has a smarter solution please feel free to share.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •