Skip to content

Conversation

@fraggerfox
Copy link

  1. Fixed a possible bug where the "login" RPC call would not allow the login to not happen because a user session does not exist, current code allows the "login" function to be a pass-through hence generating a proper session cookie which can be used for further authenticated transactions via the RPC API.
  2. Added a "createUser" RPC for remotely creating users using JSON RPC API for DokuWiki.
  • Example JSON Request to create a user

    {
    "jsonrpc" : "2.0",
    "id" : "webClient",
    "method" : {
      "methodName" : "dokuwiki.createUser"
    },
    "params" : [
      {
        "string" : "testUser"
      },
      {
        "string" : "password"
      },
      {
        "string" : "testUserName"
      },
      {
        "string" : "[email protected]"
      }
    ]
    }
    
  • Response (For success)

    {
    "jsonrpc" : "2.0",
    "id" : "webClient",
    "result" : 1,
    "error" : ""
    }
    
  • Response (For Failure)

    {
    "jsonrpc" : "2.0",
    "result" : "",
    "error" : {
      "code" : -32603,
      "message" : "Invalid E-Mail"
    },
    "id" : "webClient"
    }
    

Fox and others added 6 commits March 27, 2015 22:45
…po of the original JSON RPC by Magnus Wolf

Features added
--------------

1. Added the "createUser" function to allow the JSON RPC to create DokuWiki users remotely.
2. Allowed the "login" function to be a pass through since the user will not have a session when the function is called.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant