首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >通过Struts-1获取Shibboleth属性

通过Struts-1获取Shibboleth属性
EN

Stack Overflow用户
提问于 2013-07-11 01:52:13
回答 1查看 722关注 0票数 0

我正在尝试将Shibboleth身份验证与我继承维护的旧Struts-1应用程序集成在一起,但我不知道如何访问Shibboleth属性。

这是我尝试过的:

代码语言:javascript
复制
public final class AuthenticateAction extends MappingDispatchAction {

    public ActionForward execute(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {


        Enumeration attributeNames = request.getAttributeNames();
        while (attributeNames.hasMoreElements()) {
            String attributeNm = (String) attributeNames.nextElement();
            System.out.println("DEBUG: " + attributeNm);
        }

        String eppn = (String) request.getAttribute("eppn"); // <-- Null 

在遍历上面代码中的属性名称时,我所期望的Shibboleth属性都没有打印出来。

如何访问Shibboleth属性?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-07-16 04:33:47

事实证明,在我的例子中,这是服务器端配置的问题。

遵循这里的说明:https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPJavaInstall之后,我能够简单地获得属性:

String eppn = (String) request.getAttribute("eppn"); // <-- no longer null

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17577547

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档