Example authentication rsp

From Lianjapedia
Jump to: navigation, search

Name

example_authentication.rsp

Description

This Visual FoxPro Server Page (.rsp) demonstrates how to use the response object authenticate() method for user authentication.

Code

<%@ Language=VFP %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Lianja example - authentication</title>
</head>
<body>
<%
  if len(_SERVER["AUTH_TYPE"]) = 0 .or. len(_SERVER["REMOTE_USER"]) = 0 .or. len(_SERVER["REMOTE_PASSWORD"]) = 0
	response.Authenticate()
  endif
  ? "Hi " + proper(_SERVER["REMOTE_USER"]) + ", You have authenticated successfully."
  ? '<br>'
%>
</body>
</html>