How can I check Spring Security for user authentication and get roles from Flex? How can I check Spring Security for user authentication and get roles from Flex? spring spring

How can I check Spring Security for user authentication and get roles from Flex?


If you use Spring Blazeds integration , you can implement getUserDetails method using org.springframework.flex.security.AuthenticationResultUtils.

public Map<String, Object> getUserDetails() {   return AuthenticationResultUtils.getAuthenticationResult();}


I would write a secured Spring service method that returns the current user's roles information. Let the Flex app invoke that when the application starts up. If you receive a FaultEvent due to a security error, then prompt the user to authenticate and use ChannelSet.login().


See this blog, I followed this before Spring had a flex module, which solves this problem nicely. Hopefully it'll provide you a few gems which might help.

GridShore Blog