Ignore:
Timestamp:
4 Apr 2013, 15:12:43 (12 years ago)
Author:
uli
Message:

Provide infrastructure to remember failed logins.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/authentication.py

    r9334 r10055  
    2020"""
    2121import grok
     22import time
    2223from zope.component import getUtility
    2324from zope.password.interfaces import IPasswordManager
     
    2930from zope.session.interfaces import ISession
    3031from waeup.kofa.authentication import (
    31     KofaPrincipalInfo, get_principal_role_manager)
     32    KofaPrincipalInfo, get_principal_role_manager, FailedLoginInfo)
    3233from waeup.kofa.interfaces import (
    3334    IAuthPluginUtility, IUserAccount, IPasswordValidator)
     
    6970    def description(self):
    7071        return self.title
     72
     73    @property
     74    def failed_logins(self):
     75        if not hasattr(self.context, 'failed_logins'):
     76            self.context.failed_logins = FailedLoginInfo()
     77        return self.context.failed_logins
    7178
    7279    def _get_roles(self):
Note: See TracChangeset for help on using the changeset viewer.