JBPM REST API 运行时构建器身份验证选项?

JBPM REST API Runtime builder authentication options?

我正在尝试使用 JBPM 作为黑盒来管理我的外部 Web 应用程序的工作流。我正在使用 REST 构建器构建运行时:

            engine = RemoteRuntimeEngineFactory.newRestBuilder()
            .addUrl(new URL(jbpmProperties.getURL()))
            .addTimeout(5)
            .addDeploymentId(jbpmProperties.getDeploymentId())
            .addUserName(username)
            .addPassword(password)
            .build();

我注意到生成器的文档指出:

addPassword(String password) **always**
Set the password of the user connecting to the server
addUserName(String userName) **always**
Set the name of the user connecting to the server

除了将用户名和密码显式嵌入 RuntimeEngine 构建器之外,还有其他选择吗?有没有办法让 JBPM 和外部应用程序共享身份验证服务,而不是在构建器中使用 addUserName 和 addPassword?

共享身份验证服务是什么意思?身份验证是在运行 KIE Workbench(或 KIE 服务器)的服务器端配置的,通常需要用户名和密码。但是,最近 small change 通过允许您向请求添加自定义 headers 来添加对自定义身份验证的支持。您可以期待此功能成为即将推出的 jBPM 6.5 的一部分,但我不确定在这种情况下如何在服务器端配置身份验证。