AppEngine Cloud Endpoints and custom Users service

此生再无相见时 提交于 2019-12-08 00:29:20

问题


Is it possible to use a custom Users service (a service that implements UsersService interface) with Google AppEngine endpoints?

Let's take the example from Google AppEngine website

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

When a request is made to the application and this endpoint is hit it somehow contacts the Users service and gets the information about authenticated user (because the OAuth token is available in the request).

I'd like to somehow use my own service which would implement UsersService interface and provide me with a user object.

来源:https://stackoverflow.com/questions/21322264/appengine-cloud-endpoints-and-custom-users-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!