paraworld.auth.VerifySession

Description

在中央服务器验证指定的用户是否是在线状态

Parameters

Required Name Type Description
required sessionKey string 被验证的用户凭证
optional format int 要求返回数据的格式(0:XML 1:JSON),默认值为0

Example Return XML

<msg xmlns="">
        <result type="boolean">True</result>
        <sessionKey type="string">a4309e31-b911-407c-8acb-107d071f9b1c</sessionKey>
        <userID type="string">fae5feb1-9d4f-4a78-843a-1710992d4e70</userID>
        <expireDate type="string">2008-3-13 13:48:58</expireDate>
</msg>

Example Return JSON

{"result":"true","sessionKey":"3e3404f4-7a52-44c3-8821-fff92de734e9","userID":"1a2e3f76-7087-46f7-b563-980bf394facd","expireDate":"2008-12-6 19:56:47"}

Error Codes

当发生异常时,返回数据中会有一个“info”节点,该节点记录了异常信息。

Test Cases

case 1

case: paraworld.auth.VerifySession

Input:

{

  ["sessionKey"] = "a4309e31-b911-407c-8acb-107d071f9b1c",

}

Result:

paraworld.auth.VerifyUser: (http://192.168.0.221/Auth/VerifySession.asmx) called 

{

["expireDate"] = "",

["sessionKey"] = "",

["userID"] = "",

["result"] = false,

["info"] = "非法的访问",

}

case 1

case: paraworld.auth.VerifySession

Input:

{

  ["appKey"] = "fae5feb1-9d4f-4a78-843a-1710992d4e00",

  ["sessionKey"] = "a4309e31-b911-407c-8acb-107d071f9b1c",

}

Result:

Plug-in loaded: NPLWebServiceClient.dll

{

["expireDate"] = "2008-3-13 14:33:15",

["sessionKey"] = "a4309e31-b911-407c-8acb-107d071f9b1c",

["userID"] = "fae5feb1-9d4f-4a78-843a-1710992d4e70",

["result"] = true,

}

Topic revision: r3 - 2008-12-06 - CaoYF
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback