Class JSONRPC2Helper
java.lang.Object
net.i2p.i2pcontrol.servlets.jsonrpc2handlers.JSONRPC2Helper
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvalidateParams
(String[] requiredArgs, JSONRPC2Request req) Check incoming request for required arguments, to make sure they are valid.validateParams
(String[] requiredArgs, JSONRPC2Request req, Boolean useAuth) Check incoming request for required arguments, to make sure they are valid.
-
Field Details
-
USE_NO_AUTH
-
USE_AUTH
-
-
Constructor Details
-
JSONRPC2Helper
-
-
Method Details
-
validateParams
Check incoming request for required arguments, to make sure they are valid.- Parameters:
requiredArgs
- - Array of names of required arguments. If null don't check for any parameters.req
- - Incoming JSONRPC2 requestuseAuth
- - If true, will validate authentication token.- Returns:
- - null if no errors were found. Corresponding JSONRPC2Error if error is found.
-
validateParams
Check incoming request for required arguments, to make sure they are valid. Will authenticate req.- Parameters:
requiredArgs
- - Array of names of required arguments. If null don't check for any parameters.req
- - Incoming JSONRPC2 request- Returns:
- - null if no errors were found. Corresponding JSONRPC2Error if error is found.
-