android-oauth-client
android-oauth-client copied to clipboard
Add isAuthorized(String userId) method for SharedPreferencesCredentialStore
It would be nice to know before using the OAuthManager whether or not a valid Credential exists for a given user. Of course you could load the credential with the load(String userId, Credential credential) method and do the same logic test for determining it's validity within OAuthManager's authorize methods, but it would be nice to have this functionality within the library itself. Something like:
SharedPreferencesCredentialStore credentialStore = new SharedPreferencesCredentialStore(this, "credentialStore", new JacksonFactory());
boolean authorized = credentialStore.isAuthorized("userId");