[Twisted-web] Guard

orbitz orbitz at ezabel.com
Sun Nov 28 22:24:25 MST 2004

I'm not using PB in this, and that doesn't sound like it solves the 
issue of actually giving the department to the credential checker so it 
can give a yes or no.

This is fairly nasty but I was thinking of a possible solution being to 
inherit from SessionWrapper and rewrite teh getCredentials method and 
then rebind my new class to the one in guard so it uses my class 
internally which grabs the creds I need (shouldn't guard already work 
like this except less icky, but providing a means to specify which 
credentials to use?).

I know it sounds gross but sounds like the most straight forward 
solutiont to what I need..thoughts?

Sridhar R wrote:

>On Sun, 28 Nov 2004 22:34:19 -0500, orbitz <orbitz at ezabel.com> wrote:
>>having though, is that my authentication depends on 3 variables. A
>>username, password, and department.  I'm not sure what I have to do to
>>get these 3 things into the credential in order to authenticate. Is
>>there a class I have to subclass and then override a method for or what?
>You can proceed like this.  Authenticate using username and password
>and return a special avatar (assuming PB).  Then call
>getAvatar(department) remote method on the avatar to get the intended
>avatar.  Even if more than one guy (from different departments) had
>same username and password, the getAvatar method could easily resolve
>the conflict. :)

More information about the Twisted-web mailing list