Changeset 1513
- Timestamp:
- 05/24/06 13:16:25 (2 years ago)
- Files:
-
- trunk/turbogears/identity/soprovider.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/turbogears/identity/soprovider.py
r1360 r1513 221 221 user_name= to_db_encoding( user_name, self.user_class_db_encoding ) 222 222 user= user_class.by_user_name( user_name ) 223 if user.password!=self.encrypt_password(password):223 if not self.validate_password(user, user_name, password): 224 224 log.info( "Passwords don't match for user: %s", user_name ) 225 225 return None … … 237 237 return None 238 238 239 def validate_password(self, user, user_name, password): 240 ''' 241 Check the supplied user_name and password against existing credentials. 242 Note: user_name is not used here, but is required by external 243 password validation schemes that might override this method. 244 If you use SqlObjectIdentityProvider, but want to check the passwords 245 against an external source (i.e. PAM, a password file, Windows domain), 246 subclass SqlObjectIdentityProvider, and override this method. 247 ''' 248 return user.password == self.encrypt_password(password) 249 239 250 def load_identity( self, visit_key ): 240 251 '''