I would like to add OAuth to my endpoints backend. As the "Hello Endpoints Code Walk Through" points out, it is enough to have the following:
@ApiMethod(name = "greetings.authed", path = "hellogreeting/authed")
public HelloGreeting authedGreeting(User user) {
HelloGreeting response = new HelloGreeting("hello " + user.getEmail());
return response;
}
But what if the method type is Post and it contains a body? I cannot pass User and the request body to the method.
How can I use OAuth with Post type methods that contain a request body?