a note about what's happening with proxyForInterface

This commit is contained in:
Jean-Paul Calderone 2021-11-16 18:29:05 -05:00
parent a208502e18
commit 3a8432713f

View File

@ -260,6 +260,10 @@ class HashedLeaseInfo(proxyForInterface(ILeaseInfo, "_lease_info")): # type: ign
_lease_info = attr.ib()
_hash = attr.ib()
# proxyForInterface will take care of forwarding all methods on ILeaseInfo
# to `_lease_info`. Here we override a few of those methods to adjust
# their behavior to make them suitable for use with hashed secrets.
def is_renew_secret(self, candidate_secret):
"""
Hash the candidate secret and compare the result to the stored hashed