如何从oauth身份验证返回注册页面?我放置了应用程序的url (作为&redirect_uri=),但当用户接受身份验证时,脚本失败:
Error: Access to 'app://6cb90889-d3dd-4ca7-8bab-ea11831b922d/reg.html#access_token=xxxxxxxxxxx' from script denied它应该关闭浏览器并返回到应用程序!有什么想法吗?
发布于 2015-05-24 17:21:31
url的重定向由服务器负责。服务器必须理解redirect_uri=属性,并需要重定向它。
在J2EE的情况下。它将按如下方式完成
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, java.io.IOException {
String contextPath= "http://www.java2s.com";
response.sendRedirect(response.encodeRedirectURL(contextPath + "/maps"));
}如果你尝试了不同的东西,请让我知道。
你好,钱德拉。
https://stackoverflow.com/questions/29174399
复制相似问题