@@ -0,0 +1,1185 @@
+import java.io.IOException;%0Aimport java.net.URI;%0Aimport java.util.ArrayList;%0Aimport java.util.Properties;%0A%0Aimport java.util.logging.Logger;%0Aimport java.util.logging.Level;%0Aimport org.lp20.aikuma.storage.*;%0A%0Apublic class RefreshToken %7B%0A%09private static final Logger log = Logger.getLogger(GetAccessToken.class.getName());%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09Properties config = DemoUtils.readProps();%0A%09%09String clientId = config.getProperty(%22client_id%22);%0A%09%09String clientSecret = config.getProperty(%22client_secret%22);%0A%09%09String refreshToken = config.getProperty(%22refresh_token%22);%0A%09%09log.log(Level.INFO, %22client id: %22 + clientId);%0A%09%09log.log(Level.INFO, %22client secret: %22 + clientSecret);%0A%09%09log.log(Level.INFO, %22refresh token: %22 + refreshToken);%0A%09%09log.log(Level.INFO, %22old access token: %22 + config.getProperty(%22access_token%22));%0A%09%09GoogleAuth auth = new GoogleAuth(clientId, clientSecret);%0A%09%09%0A%09%09if (auth.refreshAccessToken(refreshToken)) %7B%0A%09%09%09System.out.println(%22Access token: %22 + auth.getAccessToken());%0A%09%09%09config.put(%22access_token%22, auth.getAccessToken());%0A%09%09%09DemoUtils.writeProps(config);%0A%09%09%7D%0A%09%09else %7B%0A%09%09%09System.err.println(%22Failed to get access token.%22);%0A%09%09%09System.exit(1);%0A%09%09%7D%0A%09%7D%0A%7D%0A

add new demo app for refreshing token