【发布时间】:2017-03-17 07:32:21
【问题描述】:
我有这段代码,但在 maven-repository 中找不到
要导入的正确库。有人知道是哪个吗?
import com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver;
/** Authorizes the installed application to access user's protected data. */
private static Credential authorize() throws IOException {
dataStoreFactory = new FileDataStoreFactory(DATA_STORE_DIR);
// set up authorization code flow
GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(
TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES).setDataStoreFactory(
dataStoreFactory).build();
// authorize
return new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize("user");
}
我找不到 com.google.api.client.extensions.jetty
https://mvnrepository.com/search?q=com.google.api.client.extensions.jetty
【问题讨论】:
标签: java maven google-cloud-platform google-authentication