Hello,
There is a certain situation where we would like the client to re-authenticate via RPCManager.setLoginRequiredCallback in the client-side code. For example, if the server turns off and on, we want the user to be prompted to re-login if they send certain DSRequests to the server.
In the server-side code, we want to send back a 401 HTTP response code instead of a normal DSResponse in the executeFetch. This will trigger the client-side code to show the login prompt. How do we cancel the normal DSResponse in the server-side code, and instead send back an HTTP response with the 401 code? The DSResponse.setStatus() does not do it because the HTTP response is still a 200 regardless of the DSResponse status. Thanks.
There is a certain situation where we would like the client to re-authenticate via RPCManager.setLoginRequiredCallback in the client-side code. For example, if the server turns off and on, we want the user to be prompted to re-login if they send certain DSRequests to the server.
In the server-side code, we want to send back a 401 HTTP response code instead of a normal DSResponse in the executeFetch. This will trigger the client-side code to show the login prompt. How do we cancel the normal DSResponse in the server-side code, and instead send back an HTTP response with the 401 code? The DSResponse.setStatus() does not do it because the HTTP response is still a 200 regardless of the DSResponse status. Thanks.
Comment