使用 PUMA 在没有密码的情况下将用户登录到 Websphere Portal [英] Login User into Websphere Portal without password using PUMA

查看:64
本文介绍了使用 PUMA 在没有密码的情况下将用户登录到 Websphere Portal的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 facebook 登录 Websphere Portal.我使用 facebook ID 来检索 LDAP uid,但无法获取密码.我可以使用什么 API 无需密码登录门户?

I want to use facebook to login into Websphere Portal. I use facebook ID to retrieve LDAP uid, but cannot get password. What API can I use to login to portal without password?

这是我的代码:

Context ctx = new InitialContext();
PortletServiceHome pumaHomeService = (PortletServiceHome) ctx.lookup("portletservice/com.ibm.portal.um.portletservice.PumaHome");
PumaHome pumaHome = pumaHomeService.getPumaService().getPortletService(PumaHome.class);
PumaLocator pumaLocator = pumaHome.getLocator(request);
List<User> users = locator.findUsersByAttribute("uid", "testUser");
User pumaUser = users.get(0);
// How to login this pumaUser without password?

推荐答案

你这里描述的是建立一个WebSphere 中的信任关系.你不能通过 PUMA SPI 做到这一点,但这个过程相当简单.

What you describe here is the establishment of a trust relationship in WebSphere. You can't do this via the PUMA SPI but the process is fairly straightforward.

高级步骤是:

  1. 实现自定义信任关联拦截器
  2. 向 WebSphere Application Server 注册
  3. 在您的 TAI 类中,返回原始逻辑中的 uid.

网上有一些教程.有些是简单,因为如果您的要求是登录,这是一个简单的过程通过用户名/uid.请记住 - TAI 非常强大,因此请务必了解并确定您的 TAI 何时选择执行其逻辑.

There are a few tutorials online. Some are simple, as it is an easy process if your requirement is to log in via username / uid. Bear in mind - TAIs are very powerful, so be sure to understand and be certain when your TAI chooses to perform its logic.

希望这会有所帮助,

-Scott H

这篇关于使用 PUMA 在没有密码的情况下将用户登录到 Websphere Portal的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆