Login form in CSPro

Discussions about CSEntry
Post Reply
cort1991
Posts: 4
Joined: May 14th, 2013, 1:39 am

Login form in CSPro

Post by cort1991 » May 28th, 2013, 6:19 am

Can we create login form in cspro. Is it possible.
regards,
Vasant

htuser
Posts: 488
Joined: December 19th, 2011, 6:26 pm
Location: HAITI

Re: Login form in CSPro

Post by htuser » May 28th, 2013, 6:21 pm

It's possible to create login page with logic. I already do it. It's very easy.
But the problem, i can't hide and encrypt the password with a hashing algorithm(transform it in "********" in the login page and in salt in the data file)
I'm convicted that Gregory Martin has some solutions to hide the password (by exemple, he can built a function to do it).
Sincerely yours,

lls
Posts: 109
Joined: December 6th, 2011, 3:11 pm
Location: Geneva, Switzerland

Re: Login form in CSPro

Post by lls » May 29th, 2013, 6:00 pm

I think that if you distribute your CSPro application in binary (with .enc extention), one should not be able to access the code, so the password would be hidden.

khurshid.arshad
Posts: 481
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: Login form in CSPro

Post by khurshid.arshad » May 29th, 2013, 7:38 pm

Use this code

Proc Password

Preproc
Set Attributes($)hidden;

htuser
Posts: 488
Joined: December 19th, 2011, 6:26 pm
Location: HAITI

Re: Login form in CSPro

Post by htuser » July 12th, 2013, 6:45 am

Dear all,
Thanks for A. and Ils for helps.
To Arshad, i think the hidden must be in the postproc because it's for hide a previously entrered password.

I would like to ask to Gregory if it's possible to have a function or another way to encrypt a value of a item so that this value can't be viewed clearly in the data file (by example, a password of a username).

Thanks in advance

Gregory Martin
Posts: 1475
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Login form in CSPro

Post by Gregory Martin » July 13th, 2013, 12:06 am

The CSPro data file is a text file, as you know, which makes it hard to hide data from human eyes, which can look at the file very easily.

You could come up with your own encryption method and apply it to fields like the password. Any method that you could come up with would be very weak encryption, but if you are only concerned with low-level "threats," it might be sufficient. For example, you could write a function in logic to apply a substitution cipher to the field:

https://en.wikipedia.org/wiki/Substitution_cipher

htuser
Posts: 488
Joined: December 19th, 2011, 6:26 pm
Location: HAITI

Re: Login form in CSPro

Post by htuser » July 13th, 2013, 9:41 am

Thank you for the help. I think it's not complicated to write a such function. When finalizing it, i will send it to you by email for comments.
Sincerely yours,

parthsaha
Posts: 12
Joined: March 8th, 2021, 11:16 am

Re: Login form in CSPro

Post by parthsaha » June 10th, 2021, 1:27 pm

Hi Martin,

I get a sense from the thread, that currently there is no way in CSPRO to show '**********' instead of the password. OR is there a way?

Please help!

Thanks

Parth

Gregory Martin wrote:
July 13th, 2013, 12:06 am
The CSPro data file is a text file, as you know, which makes it hard to hide data from human eyes, which can look at the file very easily.

You could come up with your own encryption method and apply it to fields like the password. Any method that you could come up with would be very weak encryption, but if you are only concerned with low-level "threats," it might be sufficient. For example, you could write a function in logic to apply a substitution cipher to the field:

https://en.wikipedia.org/wiki/Substitution_cipher

Gregory Martin
Posts: 1475
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Login form in CSPro

Post by Gregory Martin » June 11th, 2021, 9:29 am

There is currently no way to show a field as a password during data entry. If you are using Windows, you can hide the value using the hidden attribute here: https://www.csprousers.org/help/CSPro/s ... ement.html

We'll consider adding a password feature in a future release.

Another option is to use the prompt function to capture a password: https://www.csprousers.org/help/CSPro/p ... ction.html

htuser
Posts: 488
Joined: December 19th, 2011, 6:26 pm
Location: HAITI

Re: Login form in CSPro

Post by htuser » June 11th, 2021, 10:07 am

Dear parthsaha,
The workaround that i'm using is the prompt function with password argument https://www.csprousers.org/help/CSPro/p ... ction.html

But, if you want a more advanced way, please consider this post: https://stackoverflow.com/questions/955 ... log-prompt
In the latest version, CSPro support Webview/Webview 2 technologies both for Android and Windows devices, so you can embed Javascript/HTML5/CSS more conveniently with your application.
Josh used D3 and other JavaScript libraries as example. It upgraded it for the latest CSPro version. Please see an example: https://github.com/jhandley/cspro-D3-charts
The JavaScript driven part of your application can be opened:
a) In the CAPI part of your Entry Application. It's the part of your application, where the webview is tightly supported;
b) Using view function: https://www.csprousers.org/help/CSPro/v ... ction.html it will open it in an embedded popup window.

In both, you'll have to save the entered password in a text file and read it in CSPro using file.read function. Alasql javascript library
(https://github.com/agershun/alasql) is one of few that i know who will allow you to save locally in text format.

Hope this help you.

@ Greg, as you know, i'm advocating for the support of Javascript in CSPro Logic through the V8 engine. Please support us since
if this is done, many things will be very simple for us. So you'll concentrate yourself on CAWI instead of, natively develop a function for each user request!

Post Reply