Re: security and redirects
Re: security and redirects
- Subject: Re: security and redirects
- From: MacFirst <email@hidden>
- Date: Sun, 17 Oct 2004 08:30:15 -0700
on 10/17/04 3:16 AM, Greg Kick <email@hidden> went on and on saying, in
part:
> I am trying to implement a system for securing components in which the
> components that are restricted are listed in an xml file. The
> application reads that file and if a user tries to access a component
> listed without having authenticated the application will redirect
> him/her to a login page. I have gotten the xml portion and the
> comparison to work without any problems, but i am having trouble
> finding a way to implement the redirect. Also, I want the redirect to
> happen before the construction of the restricted component if possible.
> I have tried diverting the process at just about every point in the
> request-response loop I can find, but so far, no luck. Any
> suggestions?
Wouldn't you just do something like:
public WOComonent myAction() {
if (userIsLoggedIn())
setSecurePageMode();
else
setLoginPageMode();
return null;
}
Or
public WOComonent myAction() {
WOComponent nextPage = null;
if (userIsLoggedIn())
nextPage = PageWithName ("MySecurePage");
else
nextPage = PageWithName ("LoginPage");
return nextPage;
}
? This sounds very straightforward -- am I misunderstanding the problem?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden