Fitbit/fitbit4j — pull request #7 by dbrain (2014-05-01 01:41:22+00:00)
Title: Save updated credentials, return credentials

As part of the authentication flow you retrieve temporary credentials, and call the API to get a proper access token. For the latter fitbit4j provides a "getTokenCredentials" function.
At the moment this function returns nothing, and does not save the result. This works fine for the "in memory" credential cache example, but if you externalise that the information is lost.

I've made getTokenCredentials return the updated APIResourceCredentials (so fitbit4j does as it reads), and called the saveResourceCredentials function so these changes can be persisted.