* The returned {@link Credential} object will hold the reference to this {@link TokenRequest}
* in order to create tokens at a later point. Therefore once you pass a {@link TokenRequest}
* to this method, do not change it.
*/
public Credential asCredential(final TokenRequest r) {
return new Credential() {
@Override
public void authorizeRequest(HttpURLConnection con) throws IOException {
try {
createToken(r).asCredential().authorizeRequest(con);
} catch (OauthClientException e) {