Authentication Response Hook
The secGenerateResponse Authentication Response hook is a user-supplied function called by the RPC module in Jade client nodes on receipt of an authentication challenge request. If authentication is not enabled at the client node, the connection attempt is rejected and an exception is raised.
The secGenerateResponse function has the following format.
int JOMAPI secGenerateResponse(const DskParam *pChallenge, DskParam *pResponse);
When the client-side RPC receives a challenge request and authentication is enabled, the Authentication Response function is invoked, passing the challenge parameter sent in the challenge request message.
On successful completion of the call, the pResponse output parameter is sent back to the waiting server‑side connection.
Using the pChallenge input parameter, your user routine must generate and return the correct response in the pResponse output parameter. This requires the routine to implement an algorithm compatible with the algorithm the server-side uses to authenticate the response.
If the routine returns a non-zero result, the connection attempt is rejected, the connection is dropped immediately, and an exception is raised.
The secGenerateResponse Authentication Response hook returns the values listed in the following table.
Value | Description |
---|---|
0 | The response was successful |
Non-zero | The response failed |