Forums » General

Flex Mate Spring Security

(8 posts)
  • Started 10 months ago by deshartman
  • Latest reply from deshartman
  1. deshartman
    Member

    I need some help to get Flex working with Spring Security in a Mate way!

    I have implemented the following code using regular flex and it all works. I do not need help with Spring Security, but would appreciate some help in setting up Mate to replicate this code:

    http://livedocs.adobe.com/blazeds/1/blazeds_devguide/help.html?content=services_security_5.html

    I specifically built the "Custom authentication example" code.

    I have gone through the forums and also searched the net. The only reference I could find that is close is this one (http://www.gridshore.nl/2009/05/24/integrate-flex-security-in-mate-using-the-spring-blazeds-integration-project/), but it seems overly complicated to me.

    Would it be possible for someone to either post an equivalent mate version of the Adobe example or at least show me how I implement the channelSet.login in Mate?

    Thanks
    Des

    Posted 10 months ago #
  2. deshartman
    Member

    I found this solution at "http://blog.shrefler.net/?p=30"

    Is this the best way to do it? Is SetCredentials the way authentication is done or is there a way to do channelSet.login?

    Any help would be appreciated.

    <?xml version="1.0" encoding="utf-8"?>
    <EventMap xmlns:mx="http://www.adobe.com/2006/mxml"
    		xmlns="http://mate.asfusion.com/"
    		xmlns:services="services.*">
    	<mx:Script>
    		<![CDATA[
    			import events.LoginEvent;
    
    			public function setCredentials(username:String, password:String):void
    			{
    				services.userService.setCredentials(username, password);
    			}
    			public function logout():void
    			{
    				services.userService.logout();
    			}
    		]]>
    	</mx:Script>
    
    	<services:Services id="services"/>
    
    	<EventHandlers type="{LoginEvent.LOGIN}" debug="true">
    
    		<InlineInvoker method="setCredentials" arguments="{[event.hcoid, event.password]}"/>
    		<RemoteObjectInvoker instance="{services.userService}" method="getUserData" arguments="{[event.username]}">
    			<resultHandlers>
    			...
    			</resultHandlers>
    		</RemoteObjectInvoker>
    	</EventHandlers>
    
    	<EventHandlers type="{LoginEvent.LOGOUT}" debug="true">
    		<InlineInvoker method="logout"/>
    	</EventHandlers>
    </EventMap>

    Thanks
    Des

    Posted 10 months ago #
  3. deshartman
    Member

    ping!!

    Anybody checking the forum?

    Thanks
    Des

    Posted 10 months ago #
  4. deshartman
    Member

    Bugger..... seems a shame no interest shown in Flex - Mate - Spring :-(

    No books on it, no response in forum on it....

    +-------+--
    |            |
    |           (x)
    |        +-+-+
    |         |  |  |
    |            ^
    |           |  |
    |
    |
    +============
    Posted 10 months ago #
  5. prashanth.babu
    Member

    Des,

    Did you get any break through or any help with the issue you have.
    In fact, we are also treading the same path and it looks like it is getting complicated for me.

    Can some one help us please.

    Rgds,
    Prashanth.

    Posted 9 months ago #
  6. deshartman
    Member

    Prashanth

    Nope, that's why I have given up. It's sad that the Mate guys are not responding to this post or the other one I did. I tried to solve the issue myself, but for a newbie to Mate, it takes time to understand the framework. In the end I used this approach:

    http://www.gridshore.nl/2009/05/24/integrate-flex-security-in-mate-using-the-spring-blazeds-integration-project/

    It works well and since there is no response on the forum, I had no choice.

    I bought a book on Spring and Flex called Pro Flex on Spring and they use Cairngorm yuk!

    With the lack of examples and responses in forums, Mate is losing out on becoming the choice for Spring and Flex integration, which I see is happening more.

    Come on guys, please post some responses here!!!!

    Des

    Posted 9 months ago #
  7. Hi there,
    Unfortunately, "the Mate guys", that is Nahuel and me, don't have any experience with Spring, so we can't give you any good answer.
    I'd refer to the post you linked to and maybe ask the author?
    I am also not clear on what the actual issue is.

    Posted 9 months ago #
  8. deshartman
    Member

    Laura

    Thanks for the reply. Good to see some response on this topic.

    Actually, I do not need help on Spring at all. All I need is help on the "login" method used by BlazeDS. The reason Spring is in the equation, is that it intercepts the login as part of the Spring security framework. Spring uses channelset.login instead of the older setCredentials. Even the Adobe documentation recommends using login instead of setCredentials. So here is what I would love to get some insight from you on:

    Would it be possible to add a RemoteObjectInvoker that uses "channelset.login" instead of SetCredentials to authenticate the user?

    I had a look at the source code and I tried a few options by replacing the SetCredentials with login, but no luck. this is largely due to time and mate knowledge restrictions. I tied the example above, but finally had to settle with the gridshore example (link above). He even asks for the same thing in one of the wish list requests. Spring/Flex is making ground and it would be brilliant to remove this current hurdle to entry with mate.

    Thanks
    Des

    Thanks
    Des

    Posted 9 months ago #

RSS feed for this topic

Reply

You must log in to post.