You are really simply better off reading a plan old J2EE book. Just
go to Amazon and find one that includes a section on security.
Honestly this stuff has nothing to do with Flex. Its purely a J2EE
thing. Flex just seamlessly comes along for the ride ;)
I did promise you to post entries to a web.xml which will "secure" an
entire web application (and hence you could secure your Flex app).
Here you go. You can paste the following code into your web.xml.
Please do keep in mind.... This is assuming you have already added
1) Some user
2) Set their password
3) Placed that user into a Role called "user"
See, in J2EE those three actions are container specific. So I cant
tell you how to do it for every container. My guess is you use JRUN
(Integrated Server) which I don't use, so I'm not much help....
Anyhow, add this to web.xml after the servlet-mappings:
<security-constraint>
<display-name>Example Security Constraint</display-name>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>DELETE</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>user</role-name>
</auth-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Example BASIC-Based Authentication Area</realm-name>
</login-config>
<security-role>
<role-name>user</role-name>
</security-role>
When you now hit the web-app you will get a J2EE BASIC challenge to login.
--
Dave Wolf
Cynergy Systems, Inc.
Macromedia Flex Alliance Partner
http://www.cynergysystems.com
--- In [email protected], [EMAIL PROTECTED] wrote:
>
> I have the book Developing Rich Clients with Macromedia Flex by Steven
> Webster and Allistair McCloud and I am trying to find what is the
best chapter to
> read about security. I want to learn how to put information on a
server and have
> it be kept secure? The information would be things like passwords
and money
> amounts etc etc.
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/