OpenAM - 如何获取身份验证链中先前登录模块的状态



我正在使用OpenAM,我需要链接两个登录模块,如下所示:

1. WindowsDesktopSSO as OPTIONAL
2. CustomLoginModule as SUFFICIENT

这个想法是,如果可能的话,使用 WindowsDesktopSSO 进行身份验证,并回退到 CustomLoginModule 上,无论 WindowsDesktopSSO 成功还是失败。

CustomLoginModule 是我自己的一个模块。在 WindowsDesktopSSO 成功和失败后正确调用它。问题是我找不到如何知道WindowsDesktopSSO身份验证状态:我如何知道链中的第一个身份验证模块是成功还是失败?

我尝试使用sharedStates,但WindowsDesktopSSO不会填充sharedState。super.getLoginState()super.getCurrentState()方法也无济于事。

您知道如何获取身份验证链中先前模块的状态吗?

有两个 API 调用可能会有所帮助:

getLoginState("mymodule").getFailureModuleSet()

getLoginState("mymodule").getSuccessModuleSet()

但是,它们都是包私有的,因此无法真正从身份验证模块访问它们。

最新更新