Send a response to the client indicating that authentication is required.
A boolean value which specifies if the response was sent to the client. A return value of true specifies that the operation was successful. If an error occurs, the method returns false and the application should check the value of the LastError property to determine the cause of the failure
The RequireAuthentication method can be used within an OnCommand event handler to indicate to the client that it must provide a username and password to access the requested resource. The client should respond by issuing another request that includes the required credentials. To determine if a client has included valid credentials with its request, check the value of the IsAuthenticated property.
Some clients may require that the session be secure if authentication is requested or display warning messages to the user if the connection is not secure. If your application will require clients to authenticate before accessing specific resources, it is recommended that you enable security by setting the Secure property to True prior to starting the server.
This version of the method uses the active client session and should only be called from within a server event handler. To specify a client session outside of an event handler, use the version of this method that accepts a client ID parameter.
HttpServer Class | SocketTools Namespace | HttpServer.RequireAuthentication Overload List