ljr/livejournal/doc/raw/build/protocol/getchallenge.mode.xml

82 lines
2.4 KiB
XML
Raw Permalink Normal View History

2019-02-05 21:49:12 +00:00
<method name="getchallenge">
<shortdes>
Generate a server challenge string for authentication.
</shortdes>
<des>
Generate a one-time, quick expiration challenge to be used in challenge/response authentication methods.
</des>
<expost>
POST /interface/xmlrpc HTTP/1.0
User-Agent: XMLRPC Client 1.0
Host: www.livejournal.com
Content-Type: text/xml
Content-Length: 97
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;methodCall&gt;
&lt;methodName&gt;LJ.XMLRPC.getchallenge&lt;/methodName&gt;
&lt;/methodCall&gt;
</expost>
<!--===================[ RETURN ]==============================-->
<returns><struct count="1">
<key name="auth_scheme" count="1"><scalar><des>
You can ignore this for now. By default this is the highest version of our
authentication schemes, if in the future if we implement other auth schemes or change the default.
In that case we'd add a new capabilities exchange: your client could say, "I know c0 and c1", and
our server would then say, "Use c1, it's the best."
</des></scalar></key>
<key name="challenge" count="1"><scalar><des>
An opaque cookie to generate a hashed response from.
</des></scalar></key>
<key name="expire_time" count="1"><scalar><des>
The expiration time of the challenge, as measured in seconds since the Unix epoch.
</des></scalar></key>
<key name="server_time" count="1"><scalar><des>
The server time when the challenge was generated, as measured in seconds since the Unix epoch.
</des></scalar></key>
</struct></returns>
<exreturn>
HTTP/1.1 200 OK
Connection: close
Content-length: 557
Content-Type: text/xml
Date: Tue, 16 Jul 2002 00:30:01 GMT
Server: Apache/1.3.4 (Unix)
&lt;?xml version="1.0"?&gt;
&lt;methodResponse&gt;
&lt;params&gt;
&lt;param&gt;
&lt;value&gt;&lt;struct&gt;
&lt;member&gt;&lt;name&gt;auth_scheme&lt;/name&gt;
&lt;value&gt;&lt;string&gt;c0&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;challenge&lt;/name&gt;
&lt;value&gt;&lt;string&gt;c0:1073113200:2831:60:2TCbFBYR72f2jhVDuowz:0fba728f5964ea54160a5b18317d92df&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;expire_time&lt;/name&gt;
&lt;value&gt;&lt;int&gt;1073116091&lt;/int&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;server_time&lt;/name&gt;
&lt;value&gt;&lt;int&gt;1073116031&lt;/int&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;/struct&gt;&lt;/value&gt;
&lt;/param&gt;
&lt;/params&gt;
&lt;/methodResponse&gt;
</exreturn>
</method>