Google Marketplace应用程序授权(Java)

时间:2018-04-18 07:47:54

标签: google-app-engine google-apps-marketplace

我正在尝试制作一个可以放入市场的应用程序来阅读电子表格中的内容。

在我在java的本地开发中,我的授权总是以下类型:

import {Component, OnInit} from '@angular/core';
import {HttpClient, HttpErrorResponse, HttpResponse} from '@angular/common/http';

@Component({
  selector: 'git',
  templateUrl: './git.component.html'
})

export class GitComponent implements OnInit {
  constructor(private http: HttpClient) {
  }
  ngOnInit(): void {
    const headers = {authorization: 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJzYXNobyIsImF1dGgiOiJST0xFX1VTRVIiLCJleHAiOjE1MjQwODcyMzJ9.MUv5RgI9LxQyrrCfjfX8HR2-XiQmz4vjLqH7V_0Du7VFLC0WrK_y3FfeNoT2Nj_uguIK2ss7jv-LNiHuCGtz4A'};
    this.http.get('http://localhost:8080/links/all', headers)
      .subscribe((e) => {
        console.log(e);
      }, (err: HttpErrorResponse) => {
        console.log(err);
      });
  }
}

如何安装应用并授权拥有所有权限,该代码如何在不使用p12的情况下获取凭据?

非常感谢

1 个答案:

答案 0 :(得分:0)