宽带门户网站身份认证系统设计(2)

2008-02-23 08:10:41来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折



  该服务把身份认证系统提供的各项功能用WSDL语言描述成通用的服务接口,在这个接口中描述了身份认证服务提供给内容业务系统使用的一个函数,该函数的入口参数是用户名、用户口令和内容业务系统的ID;出口参数是该用户能否访问该内容业务系统的字符串。
以下是身份认证接口的WSDL描述:

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="railwayhelperRemoteInterface" targetNamespace="http://www.railwayhelper.com/definitions/railwayhelperRemoteInterface" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.railwayhelper.com/definitions/railwayhelperRemoteInterface" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<message name="loginRequest">
<part name="userid" type="xsd:string"/>
<part name="password" type="xsd:string"/>
<part name="serviceid" type="xsd:string"/>
</message>
<message name="loginResponse">
<part name="result" type="xsd:string"/>
</message>
<portType name="railwayhelperJavaPortType">
<operation name="login">
<input name="loginRequest" message="tns: loginRequest"/>
<output name="loginResponse" message="tns: loginResponse"/>
</operation>
</portType>
<binding name="railwayhelperBinding" type="tns:railwayhelperJavaPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="login">
<soap:operation soapAction="" style="rpc"/>
<input name="loginRequest">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tempuri.org/creator.javabean.railwayhelper"/>
</input>
<output name="loginResponse">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tempuri.org/creator.javabean.railwayhelper"/>
</output>
</operation>
</binding>
</definitions>
  在这个接口中描述了身份认证服务提供的login函数,该服务的入口参数为:userid为用户名、password为用户名、口令和时间戳一起加密后得到的字符串PWD、serviceid内容业务系统编号,返回值是否允许用户登录该内容业务系统的字符串。

  不论内容业务系统运行在何种平台上,只要根据WSDL接口的描述和SOAP协议规范,把用户名和PWD用SOAP消息发送给身份认证服务,身份认证服务就会把认证结果用SOAP消息返回个内容业务系统。内容业务系统不必了解认证服务是怎样实现的,从而实现跨平台的通用认证。

  结束语

  上述的宽带门户网站的身份认证方案已经实际应用于了湖南铁通宽带门户网站,取得了良好的效果。

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:JSP中基于Session的在线用户统计分析

下一篇:开发心得分享:10年编程无师自通