Hi
Dimitrios,
From
reading through your earlier posts I get the impression that you are using
a two methods to authenticate users. Initially, you authenticate the user using
standard J2EE form based authentication. Then when using a service if you
receive an authentication fault you use a flex popup window to re authenticate.
Is this correct?
Also,
if you get a session time out do you resubmit the original service request after
re-authentication? If so, what is the best way to generically resubmit the
request?
Regards,
Allister
----- Original Message -----
From: Dimitrios Gianninas
Sent: Monday, October 10, 2005 12:59 AM
Subject: RE: [flexcoders] Authentication with Macromedia
Flex I put theh handling of the
failed authentication directly in the Services.mxml... simple and
works.
<mx:Script>
function
handleRemoteFault( event ):Void {
if(
event.fault.faultcode == "Client.Authentication" || event.fault.faultcode ==
"401" ) {
// do whatever you want here, its a free
country
}
else
{
event.call.faultHandler( event );
}
}
</mx:Script>
Dimitrios "Jimmy" Gianninas
RIA Developer
Optimal Payments Inc.
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Knudsen Sent: Friday, October 07, 2005 9:53 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Authentication with Macromedia Flex CallbackHandler handler = new SimpleCallbackHandler( userName, password ); Subject subject = Authentication.login( handler ); ServletAuthentication.runAs( subject, httpRequest ); silightly different looking under JRun of course. Now, I'm horribly stuck on getting the roles of the user after logging in. I have set up Roles under teh JMC, JRuns instance manager. I tested it all with BASIC auth, so I know the autentication and authorisation are working. I've been working all week on getting the roles for the user after authenticating and can't find squat of an example. Any hints perhaps? On a similar note... Using service.setUserNamePassword() in Flex I know it will authenticate a user, does it also authorise the user by gathering up the roles defined in the containers JAAS config? and one more concerning cairingrom.... to use service.setUserNamePassword() effectively, it appears you would need to modify the onfault event of a service in services.mxml file to check for a failed authentication. If not here then every command using the service would need this check, eh? What other way can this be done possibly? Create a AuthCommand abstract class to extend or something? DK On 10/7/05, Dimitrios
Gianninas <[EMAIL PROTECTED]>
wrote:
-- Douglas Knudsen http://www.cubicleman.com this is my signature, like it? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
- RE: [flexcoders] Authentication with Macromedia Flex allister_dickson
- RE: [flexcoders] Authentication with Macromedia F... Dimitrios Gianninas