2

是否可以将自定义用户服务(实现 UsersService 接口的服务)与 Google AppEngine 端点一起使用?

让我们以谷歌 AppEngine 网站为例

@ApiMethod(name = "greetings.authed", path = "greeting/authed")
public HelloGreeting authedGreeting(User user) {
    HelloGreeting response = new HelloGreeting("hello " + user.getEmail());
    return response;
}

当向应用程序发出请求并命中此端点时,它会以某种方式联系用户服务并获取有关经过身份验证的用户的信息(因为 OAuth 令牌在请求中可用)。

我想以某种方式使用我自己的服务来实现UsersService接口并为我提供一个用户对象。

4

0 回答 0