Commits

Anonymous committed 0472bda

Removing assoc handle fetching, since this is now handled by validate and might even lead to a KeyError here ,,,

  • Participants
  • Parent commits 5a49d50

Comments (0)

Files changed (1)

openid2rp/django/auth.py

 # Copyright Peter Tröger, 2010
 # Licensed under the Academic Free License, version 3
 
-from django.conf import settings
 from django.contrib.auth.models import User
 from django.contrib.auth.backends import ModelBackend
 from openid2rp.django.models import UserOpenID, OpenIDSession, OpenIDNonce, DiscoveryCache
 	
 def knownNonce(n):
 	try:
-		result = OpenIDNonce.objects.get(nonce=n)
+		OpenIDNonce.objects.get(nonce=n)
 	except:
 		return False
 	return True
 	except Exception, e:
 		raise IncorrectURIError(str(e))
 	res = openid2rp.discover(claimedId)
-	if res != None:
+	if res is not None:
 		services, op_endpoint, op_local = res
 		try:
 			dcache=DiscoveryCache.objects.get(uri=claimedId)
 
 		request=credentials['openidrequest']
 		query=request.META['QUERY_STRING']
-		handle = request.GET['openid.assoc_handle']
 
 		try:
 			signed, claimedId = openid2rp.verify(query, self.discovered_get, getSessionByHandle, knownNonce)