wso2 IS 自定义联合身份验证器未显示在列表中

问题描述

我尝试了 wso2 doumentation(https://github.com/wso2/samples-is/tree/master/authenticators/components/org.wso2.carbon.identity.sample.federated.authenticator) 中给出的自定义联合身份验证器示例,构建后我已部署在 /repository/components/dropins 文件夹中。但部署后,它不会显示在联合身份验证器列表中。我使用的是 wso2 IS 5.10.0

enter image description here

以下是我从示例中使用的构建,

https://github.com/VIKRAMAS/wso2-custom-federated-authentor

但我尝试从 IS 连接器商店页面部署 github 身份验证器,但它正在工作并显示在联合身份验证器列表中,但它不适用于我部署的示例。但同样的构建在 wso2 IS version 5.12 中有效。

解决方法

由于以下问题,您的组件未在 IS5.10.0 包中激活(处于安装状态)。 enter image description here

它可能依赖于应用程序身份验证框架,并且您已将范围指定为版本 5.18.0 或更高版本。但是,5.17.5 是运行时可用的框架版本。

检查 pom 文件中的框架版本范围并将其更正为包含 5.17.5 的版本范围。检查用于 <Import-Package> in

的框架版本范围
<plugin>
     <groupId>org.apache.felix</groupId>
     <artifactId>maven-bundle-plugin</artifactId> 
<plugin>

如果框架组件未在 <Import-Package> 内定义范围,并且使用了 <DynamicImport-Package>*</DynamicImport-Package>,则运行时版本将被动态解析。它根据为依赖项定义的框架版本(通常用于编译)获取版本范围。 eg:如果框架版本为5.18.21,则在运行时搜索5.18.0 - 6.0.0版本。


您可以参考https://anuradha-15.medium.com/lets-write-and-run-your-first-osgi-service-on-wso2-platform-482f6e5e3ea5用于调试的有用 OSGi 命令部分,了解有关 OSGi 激活问题故障排除的更多信息。