Skip to content

Commit

Permalink
Remove session dependency in authenticate_header
Browse files Browse the repository at this point in the history
  • Loading branch information
pstiasny committed Feb 7, 2016
1 parent 422fe9f commit 8a84c52
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flask_httpauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ def generate_ha1(self, username, password):
return md5(a1).hexdigest()

def authenticate_header(self):
session["auth_nonce"] = self.get_nonce()
session["auth_opaque"] = self.get_opaque()
nonce = self.get_nonce()
opaque = self.get_opaque()
return '{0} realm="{1}",nonce="{2}",opaque="{3}"'.format(
self.scheme or 'Digest', self.realm, session["auth_nonce"],
session["auth_opaque"])
self.scheme or 'Digest', self.realm, nonce,
opaque)

def authenticate(self, auth, stored_password_or_ha1):
if not auth or not auth.username or not auth.realm or not auth.uri \
Expand Down

0 comments on commit 8a84c52

Please sign in to comment.