On Wed, Jun 22, 2011 at 5:05 PM, Vas <[email protected]> wrote:
> Hi guys, > I'm a bit new to Turbogears so forgive me if my question seem extra > nooby. > I'm looking for a way to implement custom user authentication. My > authentication process will not rely on database at all unlike the > TG's built in one that uses repoze.what. > My question is: Is there any way for me to create a similar structure > that would enable me to create my own validation functions and use > them as decorators? something like > > @require(passedCustomAuthentication) > def save(self,**kw): > return > > Any help would be appreciated. > > You can take a look at http://blog.axant.it/archives/226 it implements authentication on MongoDB, making it compatible with the already existing predicates. Writing you own predicate is quite simple, just inherint from Predicate class and implement your own evaluate method which calls self.unmet() if the predicate isn't met. -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.

