3

Orbeon/Tomcat 新手在这里 - 希望我只是错过了一些明显的东西......

我在 Orbeon 4 M11 上,想试用捆绑的 orbeon-auth 作为授权服务,如下所述:http ://wiki.orbeon.com/forms/doc/developer-guide/page-flow-controller /授权

最初我什至无法让 orbeon-auth 工作,但现在我已经做到了,如果我访问http://localhost:8080/orbeon-auth它会提示进行身份验证,如果我输入正确的凭据,它将返回 http 200。现在我需要配置我的页面以使用 orbeon-auth。根据上面链接中的说明,我需要设置此属性:

<property as="xs:anyURI" processor-name="oxf:page-flow" name="authorizer" value="/orbeon-auth"/>

但我不确定将代码放在哪里。我认为它可能会出现在标签内的 page-flow.xml 中<controller>,但是当我把它放在那里并尝试访问一个页面时,我得到了“Orbeon Forms - An Error Has Occurred”错误页面。我也尝试将它放在 properties-local.xml 中,但没有做任何事情。希望有人能指出我正确的方向......

这是我的 properties-local.xml 的全部内容:

<!--
    This file is an empty template for your own properties-local.xml file. Please follow the instructions here:

    http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties
-->
<properties xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:oxf="http://www.orbeon.com/oxf/processors">

    <!-- This is an example of property which overrides an existing property's default value:
    <property as="xs:NMTOKENS"
              name="oxf.xforms.logging.debug"
              value="document model submission submission-details control event action analysis server html"/>
    -->
    <property as="xs:string" name="oxf.fr.persistence.provider.Test.*.*" value="oracle"/>
    <property as="xs:string" name="oxf.fr.persistence.provider.FieldReports.*.*" value="oracle"/>

    <property as="xs:string" name="oxf.fr.persistence.service.oracle.datasource" value="oracle"/>

    <property as="xs:boolean" name="oxf.fr.persistence.oracle.create-flat-view" value="true"/>

    <property as="xs:string"  name="oxf.fr.summary.buttons.*.*" value="new print delete"/>

    <property as="xs:string" name="oxf.fr.detail.buttons.*.*" value="close clear print save save-locally submit workflow-review workflow-send"/>

    <property as="xs:boolean" name="oxf.fr.detail.edit.accept-post.*.*" value="true"/>

    <property as="xs:anyURI" name="oxf.fr.default-logo.uri.*.*"
                         value="/usr/local/tomcat/webapps/orbeon4pe/WEB-INF/resources/wb-logo.png"/>
    <property
        as="xs:anyURI"
        processor-name="oxf:page-flow"
        name="authorizer"
        value="/orbeon-auth"/>
</properties>

我没有更改/WEB-INF/resources/page-flow.xmlorbeon-auth/WEB_INF/web.xml文件 - 它们是开箱即用的。

4

1 回答 1

1

我对这个功能应该如何运作感到困惑。我通过将以下内容添加到 /WEB-INF/config/properties-local.xml 来覆盖默认页面公共方法(GET 和 HEAD):

<property
  as="xs:string"
  processor-name="oxf:page-flow"
  name="page-public-methods"
  value="HEAD"/>

...并且外部 GET 请求确实首先导致了对 orbeon-auth 的调用(没有提示进行身份验证,不确定这是否是预期的行为 - orbeon-auth 只返回 401/未授权,然后立即返回 403/禁止,没有提示) .

于 2012-10-17T14:45:06.550 回答