Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Log the JWT for debugging

  • Loading branch information...
commit 475f5e65a0312fd49107f8f13911cd1ffa4b0084 1 parent 09e2b08
Kumar McMillan authored December 28, 2012

Showing 1 changed file with 4 additions and 0 deletions. Show diff stats Hide diff stats

  1. 4  webpay/pay/forms.py
4  webpay/pay/forms.py
... ...
@@ -1,11 +1,14 @@
1 1
 from django import forms
2 2
 from django.conf import settings
3 3
 
  4
+import commonware.log
4 5
 import jwt
5 6
 from tower import ugettext as _
6 7
 
7 8
 from lib.solitude.api import client
8 9
 
  10
+log = commonware.log.getLogger('w.pay')
  11
+
9 12
 
10 13
 class VerifyForm(forms.Form):
11 14
     req = forms.CharField()
@@ -20,6 +23,7 @@ def clean_req(self):
20 23
             # L10n: first argument is a detailed error message.
21 24
             err = _('Error decoding JWT: {0}').format(exc)
22 25
             raise forms.ValidationError(err)
  26
+        log.debug('Received JWT: %r' % payload)
23 27
         if not isinstance(payload, dict):
24 28
             # It seems that some JWT libs are encoding strings of JSON
25 29
             # objects, not actual objects. For now we treat this as an

0 notes on commit 475f5e6

Please sign in to comment.
Something went wrong with that request. Please try again.