开发者社区> 问答> 正文

JopenId 的问题 求救求解。:报错

今天在做JopenID google 登录 以及yahoo登录时候

老是重定向URL过去后 发生请求的URL无效,这种提示 请问我代码有问题吗?

还是说缺少什么东西了。谢谢 各位大侠

测试代码如下:

Endpoint endpoint = manager.lookupEndpoint("Google");
Association association = manager.lookupAssociation(endpoint);
request.getSession().setAttribute(ATTR_MAC, association.getRawMacKey());
request.getSession().setAttribute(ATTR_ALIAS, endpoint.getAlias());
String url = manager.getAuthenticationUrl(endpoint, association);
HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType("text/html; charset=UTF-8");
response.sendRedirect(url);

展开
收起
kun坤 2020-06-06 18:14:02 543 0
1 条回答
写回答
取消 提交回答
  • 把详细的异常信息贴出来瞧瞧吧。

    另外:第7行代码是多余的

    ######

    第七行代码已经删了, 代码运行不报错 它从定向到Google网站以后

    Google网站提示我 这个链接无效,不知道为什么

    ######现在 gmail 经常被不间断的墙哦,概率相当之高,很有可能你就被Q了
    ######

    但是,我改用socialauth运行就正常,只是用 socialauth 在用户点击同意协议以后 返回过来取不到用户的具体资料,很头疼。哎 一个是链接无效,一个是返回参数无聊,难道真就不让我完成这个功能吗? 救命啊

    ###### 我在执行manager.lookupAssociation是报错了 ,说http://www.google.com/.../o8/ui is unreachable
    2020-06-06 18:14:09
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
鱼和熊掌可得兼-双内核特性解读 立即下载
考察数据科学家支持向量机(SVM)知识的25道题,快来测测吧 立即下载
漏洞与数据的奇点临近 立即下载