sessionexpire

sessionexpire — Expires session cookies.

Mode Description

Using this request mode, you can expire previously generated sessions, whether you generated them using the sessiongenerate call or the user logged in on the web site.

Arguments

  1. [struct](required)

    Containing keys:

    • username(required):

      • [scalar](required) Username of user logging in.

    • auth_method(optional):

      • [scalar](required) Authentication method used for this request. The default value is "clear", for plain-text authentication. "cookie" and any of the challenge-response methods are also acceptable.

    • password(optional):

      • [scalar](required) Deprecated. Password of user logging in in plaintext. If using the "clear" authentication method, either this or "hpassword" must be present.

    • hpassword(optional):

      • [scalar](required) Deprecated. MD5 digest of user's password. Not much more secure than password, but at least it's not in plain text.

    • auth_challenge(optional):

      • [scalar](required) If using challenge-response authentication, this should be the challenge that was issued to you by the server.

    • auth_response(optional):

      • [scalar](required) If using challenge-response authentication, this should be the response hash that you generate, based on the formula required for your challenge.

    • ver(optional):

      • [scalar](required) Protocol version supported by the client; assumed to be 0 if not specified. See Chapter 27, Protocol Versions for details on the protocol version.

    • expireall(optional):

      • [scalar](required) If present and true, then all of the user's sessions will be expired.

    • expire(optional):

      • [array](required) Containing items:

        • [scalar](optional; multiple allowed) Given a list of session ids, will expire each one individually. Session ids can be obtained from previous calls to sessiongenerate--notably, the id is the third field in the session.

Example 31. Sample call to LJ.XMLRPC.sessionexpire

POST /interface/xmlrpc HTTP/1.0
User-Agent: XMLRPC Client 1.0
Host: www.livejournal.com
Content-Type: text/xml
Content-Length: 542

<?xml version="1.0"?>
<methodCall>
<methodName>LJ.XMLRPC.sessionexpire</methodName>
<params>
<param>

<value><struct>
<member><name>username</name>
<value><string>test</string></value>
</member>
<member><name>password</name>

<value><string>test</string></value>
</member>
<member><name>ver</name>
<value><int>1</int></value>

</member>
<member><name>expireall</name>
<value><int>1</int></value>
</member>

</struct></value>
</param>
</params>
</methodCall>


Return Values

  1. [struct](required)

    Containing keys:

    Example 32. Sample return value for LJ.XMLRPC.sessionexpire

    HTTP/1.1 200 OK
    Connection: close
    Content-length: 1189
    Content-Type: text/xml
    Date: Fri, 26 Mar 2004 18:39:38 GMT
    Server: Apache/1.3.4 (Unix)
     
    <?xml version="1.0" encoding="UTF-8"?>
    <methodResponse>
    <params>
    <param>
    <value><struct/></value>
    </param>
    </params>
    </methodResponse>