Make validate treat HTTP code 204 as a success.

Fixes #54
This commit is contained in:
Ammar Askar authored and GitHub committed 2016-11-17 14:34:14 -05:00
1 parent 37a9bb66f1
commit 56b06ca80f
1 file changed
+4
+4
View File
@@ -182,6 +182,10 @@ class AuthenticationToken(object):
req = _make_request(AUTH_SERVER, "validate",
{"accessToken": self.access_token})
# Validate returns 204 to indicate success
# http://wiki.vg/Authentication#Response_3
if req.status_code == 204:
return True
if _raise_from_request(req) is None:
return True