[Seaside] abstract component with authentication check?
ivo.roefs at gmail.com
Sun Oct 31 08:44:03 UTC 2010
Thanks for your reply.
Now I realize that I want the authorization check everytime the
component is accessed (rendered).
I think this is not possible via #initialRequest nor by using WATask?
Would it be possible to write a custom WADelegation (or other
decoration) which does the actual authorization check?
If checkOK, pass on to next, if not render the delegate (login component).
I also encountered all kinds of "filter" methods in the code? I this
something I could use?
I indeed already use a customized session as is described in
About the snippet:
(self session mainClass new) gives me an instance of WARenderLoopMain.
#call: was implemented on WARenderLoopMain in the previous versions, but
apparently has been removed in 3.0.
If I try to make a call in an other way, I get a message "You can only
#call: and #answer: from within a callback or a Task."
Op 29/10/2010 15:31, Johan Brichau schreef:
> Hi Ivo,
> I never did authentication thingies in Seaside2.8 but I have those running in Seaside3.0, so I can try to help.
> What exactly is breaking in your current code? From what I get from your snippets, I have the impression such a scheme should work if it was working in 2.8.
> Another way to do authentication, is by defining a task and implementing the flow such that a login component is shown first.
> Btw, the seaside book has a section with an example on one way to do this: http://book.seaside.st/book/in-action/session/customize-session
> On 29 Oct 2010, at 09:09, Ivo Roefs wrote:
>> self sessionAuthenticated ifFalse: [self session mainClass new call: myLoginComponent].
>> But now after upgrading to 3.0 this no longer works. It was a hack anyway.
>> This seems so basic but I can't figure out how to do this.
>> Ivo Roefs
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
More information about the seaside