getchallenge — Generate a server challenge string for authentication.

Mode Description

Generate a one-time, quick expiration challenge to be used in challenge/response authentication methods.


    Example 15. Sample call to LJ.XMLRPC.getchallenge

    POST /interface/xmlrpc HTTP/1.0
    User-Agent: XMLRPC Client 1.0
    Host: www.livejournal.com
    Content-Type: text/xml
    Content-Length: 193 
    <?xml version="1.0"?>

    Return Values

    1. [struct](required)

      Containing keys:

      • auth_scheme(required):

        • [scalar](required) 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."

      • challenge(required):

        • [scalar](required) An opaque cookie to generate a hashed response from.

      • expire_time(required):

        • [scalar](required) The expiration time of the challenge, as measured in seconds since the Unix epoch.

      • server_time(required):

        • [scalar](required) The server time when the challenge was generated, as measured in seconds since the Unix epoch.

    Example 16. Sample return value for LJ.XMLRPC.getchallenge

    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)
    <?xml version="1.0"?>