restRespBasicAuthSet (Function) |
Top Previous Next |
This function will enable the use of basic authentication for a response, when returning status 401 (Unauthorized). This is done by setting the WWW-Authenticate header in the response to use basic authentication. This must be done to inform the client that it must provide username and password which can then be read with restReqBasicAuthGet.
Input: resp : SYSHANDLE A handle to the response.
realm : STRING A string describing which login is needed, allowing for different usernames/passwords for different pages. If not specified, a default value will be used.
enable : BOOL (Default TRUE) Set to false to disable basic authentication.
Returns: INT
Declaration: FUNCTION restRespBasicAuthSet: INT;
Example: Please see the "Examples - REST Basic Authentication Example"
|