Hello All,

I am new to WebObjects and wanted to ask you all for some help... there are several threads about login / security but I am not getting it... please help if you can!

Ok, so from what I have seen, I think the best way to implement and secure pages is with a “secureWrapper” component java class file, that pages that need to be secured inherit from.

We also throw a boolean, "isLoggedIn", in the session class that the “login.wo” sets to true after a users credentials have been verified.

appendToResponse() seems to be the chosen method of redirecting... which is one of the many things I am not getting here... it seems overly complicated in the examples espically when compared to pageWithName()... but I believe this is due to a WO constructor not being able to return a different WO.. as during the execuition of the crontstrucor the WO is not initated yet... ?

Then any WO that a user needs to be authenticated for, lets say main, “extends” the secureWrapper (instead of the normal WOComponent), and then the main's constructor calls the appendToResponse method that it inherited from the secureWrapper... and redirects based on the value of the session boolean isLoggedIn.... (retuns null, in this case leaving the user at main if isLoggedIn is true and redirecting to “login” if the boolean is false )

I think I have the logic right but the code is escaping me... I tried hacking something out, but the appendToResponse() call in the main.wo constructor gives a compile error of “cannot find symbol”. Even if I try using n.appendToResponse() where n is anything and everything I thought might work, I get the same error... And even then I am not sure my appendToResponse usage is right.. or where I am placing the call...

If someone could throw me some example code for implementing the above scenario, specifically how the main constructor and appendToResponse in the secureWrapper should look that would be hugely apperciated... or any other pointers that also apperciated...

Thanks for any help, and for listening.

Mac


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to