Security
New to WestWind Web Conneciton
Gravatar is a globally recognized avatar based on your email address. New to WestWind Web Conneciton
  kalpesh bhavsar
  All
  Apr 10, 2018 @ 05:37pm

Hi,

I am a Data Programmer in VFP,I am new to learning Web Development through WestWind Web Conneciton.

I have installed the shareware applicaiton and trying to learn to build my application 1 day at a time.

I have taken the Login Security Code and tried to embed into my app.

Login works fine but I am getting an error on line :

this.oAuthenticatedUser = this.oUserSecurity.oUser

My Login Function Looks like this :

FUNCTION Login()

CLOSE TABLES

IF !USED("C:\wconnect\usersecurity")
	USE C:\wconnect\usersecurity IN 0 ALIAS usersecurity
ENDIF


pcErrorMessage = ""
IF Request.IsPostback()
   pcUsername = Request.Form("WebLogin_txtUsername")
   pcPassword = Request.Form("WebLogin_txtPassword")

*!*		SELECT usersecurity
	IF SEEK(pcUsername,'usersecurity','lusername')
		cPw = ALLTRIM(usersecurity.password)
		IF pcPassword = cpw
			 this.customerlist()
		 endif	
	else
	   	 IF this.Authenticate("ANY",@pcErrorMessage)
	   			Response.Redirect("default.htm")
		ENDIF
	endif
RETURN
ENDIF

My quesiton is :

Is DEFINE CLASS webdemo3process AS WWC_PROCESS same as wwProces becasue I have initialised "cAuthenticationMode = "UserSecurity" in WWC_PROCESS. is that right?

Gravatar is a globally recognized avatar based on your email address. re: New to WestWind Web Conneciton
  Rick Strahl
  kalpesh bhavsar
  Apr 11, 2018 @ 01:11pm

I guess I need more info. Where is this failing? .oAuthenticatedUser is not set explicitly by our process class in recent versions so I'm not sure where that code is coming from.

Rather there is .oUserSecurity which is set during the authentication process.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: New to WestWind Web Conneciton
  kalpesh bhavsar
  kalpesh bhavsar
  Apr 11, 2018 @ 02:34pm

Thanks so much for your prompt reply

I was looking for a Global Login Code on your Documentation pages and found this code.

Basically, I have a table called usersecurity which holds the username & password information.

I want to Authenticate the login detials against this table. If matches, the user can surf through all the other pages in the project.

Can you help me with a code which willdo this.

Once again, thanks for your reply

Kalpesh

Gravatar is a globally recognized avatar based on your email address. re: New to WestWind Web Conneciton
  Rick Strahl
  kalpesh bhavsar
  Apr 12, 2018 @ 03:54am

I can't really help you with the information you've given. You posted code but not the code that is breaking.

There is no .oAuthenticatedUser property that's built in. I believe the sample you're looking explicitly creates this property as a helper. But that's not really necessary.

+++ Rick ---

© 1996-2024