From b06a5f44ac35f92a28498c90292eef1735df6f7d Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Tue, 25 Feb 2014 21:43:57 +0000 Subject: Bug 972881 - Add hooks to Bugzilla/WebService/Server/REST.pm to allow for extensions to extend and alter REST data r=glob,a=justdave --- Bugzilla/Hook.pm | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) (limited to 'Bugzilla/Hook.pm') diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm index e6a0ba283..811e858d7 100644 --- a/Bugzilla/Hook.pm +++ b/Bugzilla/Hook.pm @@ -1623,6 +1623,89 @@ See L for an example. =back +=head2 webservice_fix_credentials + +This hook allows for altering the credential parameters provided by the client +before authentication actually occurs. For example, this can be used to allow mapping +of custom parameters to the standard Bugzilla_login and Bugzilla_password parameters. + +Params: + +=over + +=item C + +A hash ref containing the parameters passed into the webservice after +they have been obtained from the URL or body of the request. + +=back + +=head2 webservice_rest_request + +This hook allows for altering any of the parameters provided by the client +after authentication has occured. You are able to change things like renaming +of keys, removing values, or adding additional information. + +Params: + +=over + +=item C + +A hash ref containing the parameters passed into the webservice after +they have been obtained from the URL or body of the request. + +=item C + +The current JSONRPC, XMLRPC, or REST object. + +=back + +=head2 webservice_rest_resources + +This hook allows for altering of the REST resources data allowing you to +add additional paths to perform additional operations or to override the +resources already provided by the webservice modules. + +Params: + +=over + +=item C + +A hash returned from each module loaded that is used to determine +which code handler to use based on a regex match of the CGI path. + +=item C + +The current JSONRPC, XMLRPC, or REST object. + +=back + +=head2 webservice_rest_response + +This hook allows for altering the result data or response object +that is being returned by the current REST webservice call. + +Params: + +=over + +=item C + +The HTTP response object generated by JSON-RPC library. You can use this +to add headers, etc. + +=item C + +A reference to a hash that contains the result data. + +=item C + +The current JSONRPC, XMLRPC, or REST object. + +=back + =head1 SEE ALSO L -- cgit v1.2.3-24-g4f1b