我想通过 Java Script(无 Java Servlet)端点使用 GAE Open-ID 联合身份验证。
是否通过 Java Script(无 Java Servlet)端点支持?如果是,我如何将 Open-ID 联合身份验证与 Java Script 端点 API 调用一起使用?
我曾在端点 API 中尝试过用户
@ApiMethod(
name = "signMe.signGoogleId",
httpMethod = "POST",
scopes = { "https://www.googleapis.com/auth/userinfo.profile" , "https://www.googleapis.com/auth/userinfo.email" }
)
public SignIn signInOpenId(User user)throws
OAuthRequestException, IOException
{
User is null always even after logging with Google\Yahoo User.
我曾在端点 API 中尝试过 HttpServletRequest req。
@ApiMethod(
name = "SignMe.signOpenId",
httpMethod = HttpMethod.GET,
scopes = { "https://www.googleapis.com/auth/userinfo.profile" , "https://www.googleapis.com/auth/userinfo.email" }
)
public SignIn signInOpenId(HttpServletRequest req)
throws IOException
{
UserService userService = UserServiceFactory.getUserService();
User newUser = userService.getCurrentUser();
newUser is null always even after logging with Google\Yahoo User.
谢谢,迪帕克