paraworld.auth.AuthUser

Description

用户登录。

Parameters

Required Name Type DescriptionSorted ascending
required password string 密码
optional newSession boolean 是否需要生成一个新的Session key,如果此值为true,表示用户重新登录并获得一个新的Session Key,如果为false或没有值,当该用户的旧Session key有效时,返回旧的Session Key,当旧的Session Key无效时,生成一个新的Session key,默认值为false
required userName string 用户名
optional format int 要求返回数据的格式(0:XML 1:JSON),默认值为0

Example Return XML

<msg xmlns="">
        <isSuccess type="boolean">True</isSuccess>
        <sessionKey type="string">9421a431-fd5e-49e5-a948-0ed95263ad3a</sessionKey>
        <userID type="string">fae5feb1-9d4f-4a78-843a-1710992d4e70</userID>
        <nid type="string">9</nid>
</msg>

Example Return JSON

{"isSuccess":"true","sessionKey":"dd7a2d85-377e-4422-80f1-56fd738ca5f3","userID":"e0dba2eb-8495-4b7d-8c3c-cf76d7cc85df","nid":"9"}

Error Codes

当发生异常时,返回数据中会有一个“errorCode”节点,该节点记录了发生错误的类型。 500:未知错误 499:提供的数据不完整 498:非法的访问 407:用户名或密码错误 412:账号未激活 413:账号被锁定

Test Cases

case 1

case: paraworld.auth.AuthUser

Input:

{

  ["userName"] = "yourname",

  ["password"] = "yourpassword",

}

Result:

Plug-in loaded: NPLWebServiceClient.dll

{

["userID"] = "6ea1ce24-bdf7-4893-a053-eb5fd2a74281",

["isSuccess"] = true,

["sessionKey"] = "f48c3a0c-8dd1-492d-a24d-eac57aea6fc7",

}

Topic revision: r8 - 2008-12-16 - 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