Esempio n. 1
0
 def check_password(self, password):
     context = self.get_password_context()
     reference = re.match('({[^}]+})?(.*)', self.password).group(2)
     result = context.verify(password, reference)
     if result and context.identify(reference) != context.default_scheme():
         self.set_password(password)
         db.session.add(self)
         db.session.commit()
     return result
Esempio n. 2
0
 def check_password(self, password):
     context = self.get_password_context()
     reference = re.match('({[^}]+})?(.*)', self.password).group(2)
     result = context.verify(password, reference)
     if result and context.identify(reference) != context.default_scheme():
         self.set_password(password)
         db.session.add(self)
         db.session.commit()
     return result