Package com.google.api.client.googleapis.extensions.appengine.auth.oauth2

Examples of com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCredentialTest


  private static final HttpTransport HTTP_TRANSPORT = new NetHttpTransport();
  private static final JsonFactory JSON_FACTORY = new JacksonFactory();

  public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
    resp.setContentType("application/json");
    AppIdentityCredential credential = new AppIdentityCredential(AnalysisConstants.SCOPES);
    Bigquery bigquery = new Bigquery.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential).setApplicationName("Streak Logs").build();

    String jobId = req.getParameter(AnalysisConstants.JOB_ID_PARAM);
    Object retVal = null;
    if (jobId == null) {
View Full Code Here


      return;
    }
    log.warning("backup complete, starting bigquery ingestion");
    log.warning("gsHandleOfBackup: " + gsHandleOfBackup);
   
    AppIdentityCredential credential = new AppIdentityCredential(AnalysisConstants.SCOPES);

    Bigquery bigquery = new Bigquery.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential).setApplicationName("Streak Logs").build();

    String datatableSuffix = "";
    if (exporterConfig.appendTimestampToDatatables()) {
View Full Code Here

  private final ImmutableSet<HTTPHeader> headers;

  OauthRawGcsService(OAuthURLFetchService urlfetch, ImmutableSet<HTTPHeader> headers) {
    this.urlfetch = checkNotNull(urlfetch, "Null urlfetch");
    this.headers = checkNotNull(headers, "Null headers");
    AppIdentityCredential cred = new AppIdentityCredential(OAUTH_SCOPES);
    storage = new Storage.Builder(new UrlFetchTransport(), new JacksonFactory(), cred)
        .setApplicationName(SystemProperty.applicationId.get()).build();
  }
View Full Code Here

      Logger.getLogger(BigQueryLoadGoogleCloudStorageFilesJob.class.getName());

  static Bigquery getBigquery() {
    List<String> scopes = Lists.newArrayList();
    scopes.add(BigQueryConstants.BQ_SCOPE);
    AppIdentityCredential credential = new AppIdentityCredential.Builder(scopes).build();
    GoogleClientRequestInitializer initializer = new CommonGoogleJsonClientRequestInitializer() {
      @SuppressWarnings("unused")
      public void initialize(
          @SuppressWarnings("rawtypes") AbstractGoogleJsonClientRequest request) {
        @SuppressWarnings("rawtypes")
View Full Code Here

  @Singleton
  Bigquery provideBigquery() {
    return new Bigquery.Builder(
        new UrlFetchTransport(),
        new JacksonFactory(),
        new AppIdentityCredential(BigqueryScopes.all()))
            .setApplicationName(BigQueryModule.class.getName())
            .build();
  }
View Full Code Here

TOP

Related Classes of com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCredentialTest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.