This repository has been archived by the owner. It is now read-only.
Browse files

Log the JWT for debugging

  • Loading branch information...
kumar303 committed Dec 28, 2012
1 parent 09e2b08 commit 475f5e65a0312fd49107f8f13911cd1ffa4b0084
Showing with 4 additions and 0 deletions.
  1. +4 −0 webpay/pay/
@@ -1,11 +1,14 @@
from django import forms
from django.conf import settings
+import commonware.log
import jwt
from tower import ugettext as _
from lib.solitude.api import client
+log = commonware.log.getLogger('')
class VerifyForm(forms.Form):
req = forms.CharField()
@@ -20,6 +23,7 @@ def clean_req(self):
# L10n: first argument is a detailed error message.
err = _('Error decoding JWT: {0}').format(exc)
raise forms.ValidationError(err)
+ log.debug('Received JWT: %r' % payload)
if not isinstance(payload, dict):
# It seems that some JWT libs are encoding strings of JSON
# objects, not actual objects. For now we treat this as an

0 comments on commit 475f5e6

Please sign in to comment.