Remove the pointless verify_auth_code wrapper - it's easier to do the verification work in the view anyway

This commit is contained in:
Danielle McLean 2017-11-03 16:40:09 +11:00
parent 3d5b537369
commit 9add6be8e4
Signed by untrusted user: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
2 changed files with 1 additions and 5 deletions

View file

@ -25,7 +25,3 @@ def gen_auth_code(req):
code['sco'] = ' '.join(req.POST.getlist('scope'))
return encode(code)
def verify_auth_code(c):
return decode(c)

View file

@ -92,7 +92,7 @@ class IndieView(TemplateView):
def post(self, request):
post = request.POST.dict()
try:
code = tokens.verify_auth_code(post.get('code'))
code = tokens.decode(post.get('code'))
except Exception:
# if anything at all goes wrong when decoding the auth code, bail
# out immediately.