On 10/3/05, Jeff Watkins <[EMAIL PROTECTED]> wrote:
>
> So this auth model uses HTTP Auth Digest?
>
> Lethalman wrote:
> > I hope you'll like my authorization model and the fix for JSON in Opera.
> >
> > This is an example on howto use the authorization:
> >
> > import turbogears
> >
> > class Root:
> >         authRootControl = turbogears.authorization.AuthMD5({'user':
> > 'anonymous'})
> >         authRoot =
> > turbogears.authorization.Authentication(authRootControl.checkAuth,
> > "Root")
> >         _authorization = authRoot
> >
> >         authAdminControl = turbogears.authorization.AuthMD5({'admin': 
> > 'test'})
> >         authAdmin =
> > turbogears.authorization.Authentication(authAdminControl.checkAuth,
> > "Admin")
> >
> >         @turbogears.expose()
> >         def index(self):
> >                 return "You need to be authorized by authRoot"
> >
> >         @turbogears.expose(auth=authAdmin)
> >         def admin(self):
> >                 return "authRoot doesn't check for this because
> > there's authAdmin instead"
> >
> > --
> > www.italianpug.org - Italian Python User Group Founder
>
>
> --
> Jeff Watkins
> http://metrocat.org/
>
No this is a basic auth... AuthMD5 just keep tracks of username and
passwords for that authentication, it's like the .htpasswd for apache
httpd and uses MD5 when it registers or checks passwords. Needs to be
refined yet...
However i'm going to implement the digest auth too.

--
www.italianpug.org - Italian Python User Group Founder

Reply via email to