Browse Source

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

pull/1/head
Danielle McLean 4 years ago
parent
commit
9add6be8e4
Signed by: 00dani GPG Key ID: 5A5D2D1AFF12EEC5
  1. 4
      lemonauth/tokens.py
  2. 2
      lemonauth/views/indie.py

4
lemonauth/tokens.py

@ -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)

2
lemonauth/views/indie.py

@ -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.

Loading…
Cancel
Save