wwWebPage::Authenticate
Allows you to check whether the current request is authenticated and if not prompt for authentication.
This mechanism is fully self contained - it will:
-
* Check for authentication
* If not authenticated present an authentication dialog
* After authentication is successful return you back to the original page
This mechanism simply defers to wwProcess.Authenticate.. The authentication mechanism used (Basic or wwUserSecurity) depends on the wwProcess.cAuthenticationMode property configured on your process class. The default is Basic (ie. Windows Authentication).
This simple method allows you to query the user's authentication in the OnLoad() of the page:
foxpro
foxpro
IF !THIS.Authenticate("ANY") && Basic Auth
RETURN && not validated - login dialog
ENDIF
* ** Authenticated - move on
Typically you'd call this code from the OnLoad of the form right at the beginning of page processing.
o.Authenticate(lcValidUserName,lcErrorMessage)
.T. or .F.
Parameters
lcValidUserName
A username or WCINI or ANY
lcErrorMessage
Error message to display if validation fails.
See also
Class wwWebPage© West Wind Technologies, 2025 • Updated: 2025-03-12
Comment or report problem with topic