1. Mohamed Nasr
  2. PowerBuilder
  3. Thursday, 19 July 2018 14:34 PM UTC

I am trying to authenticate the user using the LDP, the configuration on the server (AEM) tested OK when I run the application on the mobile and enter the username and password I am getting Error code: -1 username is required.

The script below on the application opening is this the correct please to call the LDP authentication function?

 

 

//*-----------------------------------------------------------------*/
//* open: Application Open Script
//* 1) Instantiate connection service
//* 2) Populate SQLCA and Connect to the database
//* 3) Open main window
//*-----------------------------------------------------------------*/
n_genapp_connectservice lnv_connectserv

lnv_connectserv = Create using "n_genapp_connectservice"

If lnv_connectserv.of_ConnectDB ( ) = 0 Then
/* LDP Authentication */
   String ls_username, ls_password,ls_result
   ls_result=AppeonLDAPLogon(ls_username,ls_password )
   If ls_result > "" Then
        open(w_genapp_main)

     ElSE
           MessageBox("ERROR", "The userid/password is not valid!")
     End If

END IF

Appeon Support Team Accepted Answer Pending Moderation
  1. Monday, 23 July 2018 05:49 AM UTC
  2. PowerBuilder
  3. # 1

Hi Mohamed,

Appeon does not provide function to get the password as this data highly confidential.

AppeonGetAppeonUserName function is used to get the user name that you type into the Appeon Login dialog box. When you can get the user name with this function, it means the user is authenticated through using the LDP and logged into the app. So there’s no need for authentication using AppeonLDAPLogon function any more.
You may refer to below help for more information:
https://www.appeon.com/support/documents/appeon_online_help/pb2017r2/workarounds_and_api_guide/ch01s03s02.html#AppeonGetAppeonUserName_function


if you do not want to use the Appeon login window, instead you want to your own login window, you can use the AppeonLDAPLogon function and you do not need configure the app security settings in AEM (AEM > Application > Client Security > User Authentication).
You may refer to the below help for more information:
https://www.appeon.com/support/documents/appeon_online_help/pb2017r2/server_configuration_guide_for_net/Application_Security_Settings.html#application_security_aem

Regards,
ZhaoKai

Comment
There are no comments made yet.
Mohamed Nasr Accepted Answer Pending Moderation
  1. Saturday, 21 July 2018 15:35 PM UTC
  2. PowerBuilder
  3. # 2

Hello,

Thank you for your response.

 

I added the username after your first response it works but I still getting an error on the password because there is no function to get the password from Appeon mobile login screen.

How to get the password I entered from the Appeon mobile login screen ?

 

 

//*-----------------------------------------------------------------*/
//* open: Application Open Script
//* 1) Instantiate connection service
//* 2) Populate SQLCA and Connect to the database
//* 3) Open main window
//*-----------------------------------------------------------------*/
n_genapp_connectservice lnv_connectserv

lnv_connectserv = Create using "n_genapp_connectservice"

If lnv_connectserv.of_ConnectDB ( ) = 0 Then
/* LDP Authentication */
   String ls_username, ls_password,ls_result

   ls_username= AppeonGetAppeonUserName ( )
   ls_result=AppeonLDAPLogon(ls_username,ls_password )
   If ls_result = "" Then
        open(w_genapp_main)

     ElSE
           MessageBox("ERROR", "The userid/password is not valid!")
     End If

END IF

 

Comment
There are no comments made yet.
Mohamed Nasr Accepted Answer Pending Moderation
  1. Friday, 20 July 2018 16:13 PM UTC
  2. PowerBuilder
  3. # 3

I manage to get the username using  appeongetappeonusername() function.

How can I get the password from Appeon login screen?

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 19 July 2018 14:47 PM UTC
  2. PowerBuilder
  3. # 4

Hi Mohamed;

     I do not see anywhere in your script where you assign the actual value of the User's name & password before calling the LDAP method? That is ...

  • ls_username = "?????"
  • ls_password = "?????"

Am I missing something?

Regards ... Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.