The User Service Plugin provides the ability to add,edit,delete users by sending an http request to the server. It is intended to be used by applications automating the user administration process. This plugin's functionality is useful for applications that need to administer users outside of the Openfire admin console. An example of such an application might be a live sports reporting application that uses XMPP as its transport, and creates/deletes users according to the receipt, or non receipt, of a subscription fee.
Copy userservice.jar into the plugins directory of your Openfire server. The plugin will then be automatically deployed. To upgrade to a new version, copy the new userservice.jar file over the existing file.
The following parameters can be passed into the request:
|type||Required||The admin service required. Possible values are add, delete, update, enable, disable|
|secret||Required||The secret key that allows access to the User Service.|
|username||Required||The username of the user to add, update, delete, enable, or disable. ie the part before the @ symbol.|
|password||Required for add operation||The password of the new user or the user being updated.|
|name||Optional||The display name of the new user or the user being updated.|
|Optional||The email address of the new user or the user being updated.|
|groups||Optional||List of groups where the user is a member. Values are comma delimited.|
The following example adds a user
|IllegalArgumentException||one of the parameters passed in to the User Service was bad.|
|UserNotFoundException||No user of the name specified, for a delete or update operation, exists on this server.|
|UserAlreadyExistsException||A user with the same name as the user about to be added, already exists.|
|RequestNotAuthorised||The supplied secret does not match the secret specified in the Admin Console or the requester is not a valid IP address.|
|UserServiceDisabled||The User Service is currently set to disabled in the Admin Console.|