开发者社区 问答 正文

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 573 分享
分享
版权
举报
1 条回答
写回答
取消 提交回答
  • 把详细的异常信息贴出来瞧瞧吧。

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

    ######

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

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

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

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

    ###### 我在执行manager.lookupAssociation是报错了 ,说http://www.google.com/.../o8/ui is unreachable
    2020-06-06 18:14:09 举报
    赞同 评论

    评论

    全部评论 (0)

    登录后可评论
问答分类:
问答地址:
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等