Skip to content

Commit

Permalink
Reuse 'DEFAULT_DIGEST' declared in 'repoze.who._auth_tkt'.
Browse files Browse the repository at this point in the history
Allow changing in only one location.
  • Loading branch information
tseaver committed May 31, 2016
1 parent 565160e commit 275d134
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions repoze/who/plugins/auth_tkt.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ def _utcnow(): #pragma NO COVERAGE
return _UTCNOW
return datetime.datetime.utcnow()

DEFAULT_DIGEST = hashlib.md5

@implementer(IIdentifier, IAuthenticator)
class AuthTktCookiePlugin(object):

Expand All @@ -51,7 +49,7 @@ class AuthTktCookiePlugin(object):
def __init__(self, secret, cookie_name='auth_tkt',
secure=False, include_ip=False,
timeout=None, reissue_time=None, userid_checker=None,
digest_algo=DEFAULT_DIGEST):
digest_algo=auth_tkt.DEFAULT_DIGEST):
self.secret = secret
self.cookie_name = cookie_name
self.include_ip = include_ip
Expand Down Expand Up @@ -229,7 +227,7 @@ def make_plugin(secret=None,
timeout=None,
reissue_time=None,
userid_checker=None,
digest_algo=DEFAULT_DIGEST,
digest_algo=auth_tkt.DEFAULT_DIGEST,
):
from repoze.who.utils import resolveDotted
if (secret is None and secretfile is None):
Expand Down

0 comments on commit 275d134

Please sign in to comment.