code: public OAuthHmacCredential createAndStoreCredential(OAuthCredentialsResponse response,
              String userId) throws IOException {
          OAuthHmacCredential credential = new10aCredential(userId)
                  .setAccessToken(response.token)
                  .setTokenSharedSecret(response.tokenSecret);
          CredentialStore credentialStore = getCredentialStore();
          if (credentialStore != null) {
              credentialStore.store(userId, credential);
          }
          if (credentialCreatedListener != null) {
              credentialCreatedListener.onCredentialCreated(credential, response);
          }
          return credential;
      }
docs: Creates a new credential for the given user ID based on the given token
  response and store in the credential store.
  
  @param response OAuth 1.0a authorization token response
  @param userId user ID or {@code null} if not using a persisted credential
  store
  @return newly created credential
  @throws IOException