Esempio n. 1
0
 def authenticate(self, environ, identity):
     try:
         username = identity['login']
         password = identity['password']
     except KeyError:
         return None
     
     success = User.authenticate(username, password)
     
     return success
Esempio n. 2
0
 def add_metadata(self, environ, identity):
     username = identity.get('repoze.who.userid')
     user = User.get(username)
     
     if user is not None:
         identity['user'] = user