Ticket #3056: IUsernameMD5Password_Deprecated.patch
| File IUsernameMD5Password_Deprecated.patch, 1.9 KB (added by jesstess, 3 years ago) |
|---|
-
twisted/spread/pb.py
1207 1207 1208 1208 1209 1209 class IUsernameMD5Password(ICredentials): 1210 """I encapsulate a username and a hashed password. 1210 """ 1211 This class is redundant with 1212 L{twisted.cred.credentials.IUsernameHashedPassword} and is deprecated. 1211 1213 1214 I encapsulate a username and a hashed password. 1215 1212 1216 This credential is used for username/password over 1213 1217 PB. CredentialCheckers which check this kind of credential must 1214 1218 store the passwords in plaintext form or as a MD5 digest. … … 1216 1220 @type username: C{str} or C{Deferred} 1217 1221 @ivar username: The username associated with these credentials. 1218 1222 """ 1223 def __init__(self): 1224 """ 1225 This method exists solely to issue a deprecation warning. 1226 """ 1227 warnings.warn( 1228 "twisted.spread.pb.IUsernameMD5Password is deprecated " 1229 "since Twisted 10.0", 1230 category=DeprecationWarning, 1231 stacklevel=2) 1219 1232 1233 1220 1234 def checkPassword(password): 1221 """Validate these credentials against the correct password. 1235 """ 1236 Validate these credentials against the correct password. 1222 1237 1223 1238 @param password: The correct, plaintext password against which to 1224 1239 check. … … 1227 1242 password matches. 1228 1243 """ 1229 1244 1245 1230 1246 def checkMD5Password(password): 1231 """Validate these credentials against the correct MD5 digest of password. 1247 """ 1248 Validate these credentials against the correct MD5 digest of password. 1232 1249 1233 1250 @param password: The correct, plaintext password against which to 1234 1251 check. … … 1238 1255 """ 1239 1256 1240 1257 1258 1241 1259 class _PortalRoot: 1242 1260 """Root object, used to login to portal.""" 1243 1261
