[Seaside] Authenticaing Multiple Users
Ian Prince
ian at inextenso.com
Thu Nov 20 22:25:15 CET 2003
On 20 nov. 03, at 20:28, Avi Bryant wrote:
>
> On Nov 20, 2003, at 11:05 AM, Sven Van Caekenberghe wrote:
>
>> In an attempt to authenticate multiple users for a Seaside app, I
>> made a subclass of WAAuthenticatedSession and overwrote the method
>> #authenticateUser:password: returning true or false based on our own
>> test.
>>
>> This didn't work at all, not when choosing that session class in
>> /seaside/config, and not when using
>> WAController>>registerAsApplication:sessionClass:
>>
>> In both cases the effect was quite bizar: Seaside kept sending
>> redirects until Safari gave up.
>>
>> What am I doing wrong, or is there a better approach ?
>
> Hi Sven,
>
> I managed to replicate this by throwing an error in the
> #authenticateUser:password: method. I imagine that if you put a "self
> halt" there you will find that there's some exception being thrown in
> yours as well.
>
> My guess is that what's happening is that it keeps trying to display
> the error page, but requiring authentication for that too, resulting
> in an infinite recursion. Obviously this is a bug - I think it will
> get fixed naturally as a result of some of the work I've been doing
> towards the next release.
>
> Avi
Hi Sven and Avi,
I ran into exactly the same issue last week trying to solve the same
problem.
The error I made (which caused the same Safari redirection problem as
Sven reports) was to not return aBoolean in my home-grown:
MultipleUserAuthenticatedSession>>authenticateUser: username password:
password
At one point I had the method returning False (on username/password
mis-match) instead of false. Yes, I've been spending too much time with
Python... At the time I felt too silly to blog my error...
Ian.
More information about the Seaside
mailing list