---+!! =paraworld.auth.AuthUser= <div style="float: right; margin: 5px; width: 250px; color: #4e5155; background-color: #f0eded; border: #ccc 1px solid; padding: 5px"> *Contents* %TOC% </div> ---++ Description 用户登录。 ---++ Parameters |*Required*|*Name*|*Type*|*Description*| |<font color="#4682b4">required</font>|userName|%BLUE%string%ENDCOLOR%|用户名| |^|password|%BLUE%string%ENDCOLOR%|密码| |<font color="#4682b4">optional</font>|newSession|%BLUE%boolean%ENDCOLOR%|是否需要生成一个新的Session key,如果此值为true,表示用户重新登录并获得一个新的Session Key,如果为false或没有值,当该用户的旧Session key有效时,返回旧的Session Key,当旧的Session Key无效时,生成一个新的Session key,默认值为false| |^|format|%BLUE%int%ENDCOLOR%|要求返回数据的格式(0:XML 1:JSON),默认值为0| ---++ Example Return XML <verbatim> <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> </verbatim> ---++ Example Return JSON <verbatim> {"isSuccess":"true","sessionKey":"dd7a2d85-377e-4422-80f1-56fd738ca5f3","userID":"e0dba2eb-8495-4b7d-8c3c-cf76d7cc85df","nid":"9"} </verbatim> ---++ Error Codes 当发生异常时,返回数据中会有一个“errorCode”节点,该节点记录了发生错误的类型。 500:未知错误 499:提供的数据不完整 498:非法的访问 407:用户名或密码错误 412:账号未激活 413:账号被锁定 ---++ Test Cases ---+++!! case 1 _case_: paraworld.auth.AuthUser Input: <verbatim> { ["userName"] = "yourname", ["password"] = "yourpassword", } </verbatim> _Result_: <verbatim> Plug-in loaded: NPLWebServiceClient.dll </verbatim> { ["userID"] = "6ea1ce24-bdf7-4893-a053-eb5fd2a74281", ["isSuccess"] = true, ["sessionKey"] = "f48c3a0c-8dd1-492d-a24d-eac57aea6fc7", }
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r8
<
r7
<
r6
<
r5
<
r4
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r8 - 2008-12-16
-
CaoYF
Home
Site map
CCWeb web
HaqiTeen web
Main web
ParaEngine web
TWiki web
Main Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
导航页WebTopMenu
Preferences
开发指南
Getting Started
ParacraftSDK
NPL
MCML
NPL Reference Manual
美术Mod
Account
Log In
English
简体中文
簡體中文
E
dit
A
ttach
Copyright © 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