示例#1
0
文件: User.py 项目: bendavis78/zope
 def authenticate(self, password, request):
     passwrd=self._getPassword()
     result = AuthEncoding.pw_validate(passwrd, password)
     domains=self.getDomains()
     if domains:
         return result and domainSpecMatch(domains, request)
     return result
示例#2
0
 def authenticate(self, password, request):
     passwrd=self._getPassword()
     result = AuthEncoding.pw_validate(passwrd, password)
     domains=self.getDomains()
     if domains:
         return result and domainSpecMatch(domains, request)
     return result
示例#3
0
 def _encryptPassword(self, pw):
     return AuthEncoding.pw_encrypt(pw, 'SSHA')
示例#4
0
 def _isPasswordEncrypted(self, pw):
     return AuthEncoding.is_encrypted(pw)
示例#5
0
文件: User.py 项目: bendavis78/zope
 def _encryptPassword(self, pw):
     return AuthEncoding.pw_encrypt(pw, 'SSHA')
示例#6
0
文件: User.py 项目: bendavis78/zope
 def _isPasswordEncrypted(self, pw):
     return AuthEncoding.is_encrypted(pw)
示例#7
0
 def check_password(self, attempt):
     return AuthEncoding.pw_validate(self.password, attempt)
示例#8
0
 def hash_password(self, value):
     return AuthEncoding.pw_encrypt(value, self.DEFAULT_PASSWORD_SCHEME)
示例#9
0
def test_bcrypt__BCryptScheme__1():
    """BCryptScheme is registered in AuthEncoding."""
    assert 'BCRYPT' in AuthEncoding.listSchemes()