Permalink
Browse files
Log the JWT for debugging
- Loading branch information...
Showing
with
4 additions
and
0 deletions.
-
+4
−0
webpay/pay/forms.py
|
|
@@ -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('w.pay')
|
|
|
+
|
|
|
|
|
|
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