android-oauth-client icon indicating copy to clipboard operation
android-oauth-client copied to clipboard

Add isAuthorized(String userId) method for SharedPreferencesCredentialStore

Open vincentjames501 opened this issue 11 years ago • 0 comments

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");

vincentjames501 avatar Aug 06 '13 19:08 vincentjames501