Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google app engine 端点上的身份验证引发InvocationTargetexception_Google App Engine_Firebase_Google Cloud Endpoints - Fatal编程技术网

Google app engine 端点上的身份验证引发InvocationTargetexception

Google app engine 端点上的身份验证引发InvocationTargetexception,google-app-engine,firebase,google-cloud-endpoints,Google App Engine,Firebase,Google Cloud Endpoints,在那里。 我用Google云引擎创建了一个API,它使用Firebase进行身份验证。但我总是调用此Api,响应是: { "error": { "errors": [ { "domain": "global", "reason": "badRequest", "message": "java.lang.reflect.InvocationTargetException" } ], "code": 400, "message": "java.lang.reflect

在那里。 我用Google云引擎创建了一个API,它使用Firebase进行身份验证。但我总是调用此Api,响应是:

{
"error": {
"errors": [
  {
    "domain": "global",
    "reason": "badRequest",
    "message": "java.lang.reflect.InvocationTargetException"
  }
],
"code": 400,
"message": "java.lang.reflect.InvocationTargetException"
}
}
在删除参数“User User”的情况下,我得到了200个成功响应

这是我的代码:

@Api(
    name = "crumb",
    version="v2",
    authenticators = {EspAuthenticator.class},
    issuers = {
            @ApiIssuer(
                    name = "firebase",
                    issuer = "https://securetoken.google.com/[Project-ID]",
                    jwksUri = "https://www.googleapis.com/service_accounts/v1/metadata/x509/securetoken@system.gserviceaccount.com")
    },
    issuerAudiences = {
            @ApiIssuerAudience(name = "firebase", audiences = "[Project-ID]")
    }
)

public class crumbAPI {


   @ApiMethod(name = "getCrumbById",path = "{crumbId}",httpMethod = ApiMethod.HttpMethod.GET)
   public Object getCrumbById(User user, @Named("crumbId") String crumbId) throws IOException, NotFoundException, UnauthorizedException {

        if (user == null) {
              throw new UnauthorizedException("Invalid credentials");
        }

        CrumbInfo ci = CrumbInfo.entityToCrumb(crumbId);
        Bean response = new Bean();
        response.setData(ci);
        return response;

  }
}

我用它作为参考:

你找到答案了吗?你找到答案了吗?