Moving all OAuth code and samples to use Storage consistently
diff --git a/oauth2client/client.py b/oauth2client/client.py
index 6ef38a6..3527a48 100644
--- a/oauth2client/client.py
+++ b/oauth2client/client.py
@@ -139,7 +139,12 @@
# True if the credentials have been revoked or expired and can't be
# refreshed.
- self.invalid = False
+ self._invalid = False
+
+ @property
+ def invalid(self):
+ """True if the credentials are invalid, such as being revoked."""
+ return self._invalid
def set_store(self, store):
"""Set the storage for the credential.
@@ -202,7 +207,7 @@
try:
d = simplejson.loads(content)
if 'error' in d:
- self.invalid = True
+ self._invalid = True
self.store(self)
except:
pass
@@ -272,7 +277,7 @@
only the access_token is present it can not be refreshed and will in time
expire.
- OAuth2Credentials objects may be safely pickled and unpickled.
+ AccessTokenCredentials objects may be safely pickled and unpickled.
Usage:
credentials = AccessTokenCredentials('<an access token>',