views:

72

answers:

1

Hi,

Please be gentle on the quasiNoob(expert w/Flex & Actionscript, != expert w/Spring) !

I am on Mac Snow Leopard and using STS 2.3.2 Release w/the Flash Builder 4 plugin and tomcat 6.

Everything works except for the security exclusion using the Spring @Secured annotation in the java class: When I am not logged in, I can enter messages through the sayHello Flex UI and see them post on the server & get the reply back. I should be getting an error instead.

I have worked through all the Refcardz 'Flex 4 & Spring 3 Integration': http://refcardz.dzone.com/refcardz/flex-4-and-spring-3. It was great, especially in explicitly calling out dependencies.

It even returns a 'Bad credentials' error message if I try to log in with the wrong userid/password.

I have copied all the code from the Refcard, so I don't think it would be useful to paste loads of code here.

Any advice is most appreciated.

Thanks!

wT

===================================

8/12/10: 1. removed/re-added the flexspring app 2. clean/republish to Tomcat 3. re-booted

Still not rejecting messages from unauthenticated user

A: 

Did you add the filters to the web.xml file?

<filter>
  <filter-name>springSecurityFilterChain</filter-name>
  <filter-class>
  org.springframework.web.filter.DelegatingFilterProxy
  </filter-class>
</filter>
<filter-mapping>
  <filter-name>springSecurityFilterChain</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>
James Ward
Hi James,Thank you once again for the excellent tutorial. Yes, I have the filters in the web.xml file. I was pretty careful to make sure my code matches yours.The only differences I'm aware of is that a few of the libraries are later versions.Is there any additional debugging/tracing I can do to help pin this down?
webTrauma
Hmmm... I'm not sure what else could be different. You can download the final war file and compare differences between the two:http://static.springsource.org/spring-flex/refcard/flexspring-refcard_completed.zipTo debug you can enable debugging for Spring Security:log4j.logger.org.springframework.security=DEBUG
James Ward