2016-11-03 232 views
0

我有這段代碼,但是在maven-repository中找不到如何導入LocalServerReceiver()?

要導入的正確的庫。有人知道這是什麼嗎?

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

回答