Webxサーバ側認証
Webx 3はサーバ側認証をサポートしており、クライアント認証はまだサポートされていません.サーバ側検証構成はform.xmlでは、大体次のように構成されています.
- <?xml version="1.0" encoding="UTF-8"?>
- <beans:beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:services="http://www.alibaba.com/schema/services"
- xmlns:fm-conditions="http://www.alibaba.com/schema/services/form/conditions"
- xmlns:fm-validators="http://www.alibaba.com/schema/services/form/validators"
- xmlns="http://www.alibaba.com/schema/services/form/validators"
- xmlns:beans="http://www.springframework.org/schema/beans"
- xmlns:p="http://www.springframework.org/schema/p"
- xsi:schemaLocation="
- http://www.alibaba.com/schema/services http://localhost:8080/schema/services.xsd
- http://www.alibaba.com/schema/services/form/conditions http://localhost:8080/schema/services-form-conditions.xsd
- http://www.alibaba.com/schema/services/form/validators http://localhost:8080/schema/services-form-validators.xsd
- http://www.springframework.org/schema/beans http://localhost:8080/schema/www.springframework.org/schema/beans/spring-beans.xsd
- ">
-
- <services:form postOnlyByDefault="true">
- <!--
- - ===============================================
- - csrf token。
- - ===============================================
- -->
- <services:group name="csrfCheck">
- <services:field name="csrfToken">
- <csrf-validator>
- <message> </message>
- </csrf-validator>
- </services:field>
- </services:group>
- <!--
- - ===============================================
- - Simple form
- - ===============================================
- -->
- <services:group name="simple" extends="csrfCheck">
- <services:field name="name" displayName=" ">
- <required-validator>
- <message> ${displayName}</message>
- </required-validator>
- </services:field>
- </services:group>
- </services:form>
-
- </beans:beans>
Webx 2では次のようになります.
- <?xml version="1.0" encoding="GB18030"?>
- <form>
- <group name="register">
- <field name="id" displayName=" ID">
- <required-validator>
- <message> ${displayName}</message>
- </required-validator>
- <regexp-validator pattern="^[A-Za-z_][A-Za-z_0-9]*$">
- <message>${displayName} 、 、 </message>
- </regexp-validator>
- <length-validator minLength="4" maxLength="10">
- <message>${displayName} ${minLength} , ${maxLength} </message>
- </length-validator>
- </field>
- </group>
- </form>