return cache_key in jwt
This commit is contained in:
@@ -20,7 +20,7 @@ class CustomizedTokenObtainPairSerializer(TokenObtainPairSerializer): # noqa
|
||||
|
||||
captcha_code = self.context['request'].data['captcha_code']
|
||||
captcha_key = self.context['request'].data['captcha_key']
|
||||
|
||||
return {"cache_key": cache.get(captcha_key)}
|
||||
if captcha_code != cache.get(captcha_key) or captcha_code not in self.context['request'].data.keys():
|
||||
raise captcha_exception.CaptchaFailed()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user