Authenticator mode in NgClient versions 2024.3.1

Hi, I’m quite new to Servoy and I’m getting started with the Authenticator process.
I’ve created a solution with NG-client and set the authenticator as AUTHENTICATOR, as explained here Authentication | Docs
I’ve created another solution (type: module) labeled as authenticator, but I can’t understand how to connect to the stateless login form.
Our goal is to implement in the authenticator solution a LDAP login.
Can you help me explain how the authentication solution is connected to the stateless login form? And what are the best practices for a LDAP login in servoy?
I also attached the screen of the properties of the main solution

Hi,

welcome to the forum.

The url you’ve mentioned basically contains all the information you need.
In order to use the stateless login using the authenticator solution.

  1. create a media Login Page.
  2. set the main solution to authenticator type ‘Authenticator’
  3. create the authenticator solution and make sure that you create the ‘onSolutionOpen’ function as explained.
    the onSolutionOpen function can be created directly from the properties at solution level.
    Concerning creation of the authenticator solution: from your main solution right-click the ‘Modules’ node and choose ‘Create new module’, set the solution name and make sure the solution type will become ‘Authenticator’

Based on these 3 steps it already works.

Concerning using LDAP, I’m not familiar with that myself.
However in the onSolutionOpen function you will get username/password which you need to verify against LDAP.
Based on the LDAP authentication result, you can then call ‘security.login’ , which will get you into your main solution.

Hope this helps

Hi

mboegem:
, thanks a lot for the answer. The first two steps are quite straightforward, while I’m not sure about the creation of the function “onSolutionOpen” which can be created directly from the properties at solution level.
I have created a function inside the authenticator module in Scopes → Global
[attachment=1]Screenshot 2024-05-17 164124.png[/attachment]
Then I called the function on the onOpen method

[attachment=0]Screenshot 2024-05-17 164513.png[/attachment]
But the authenticator is not called.
Sorry for the silly question but I can’t understand how the login media will call the authenticator.

Hi, thanks a lot for the answer. The first two steps are quite straightforward, while I’m not sure about the creation of the function “onSolutionOpen” which can be created directly from the properties at solution level.
I have created a function inside the authenticator module in Scopes → Global
Screenshot 2024-05-17 164124.png
function creation
Screenshot 2024-05-17 164124.png (13.04 KiB) Viewed 123 times

Then I called the function on the onOpen method

Screenshot 2024-05-17 164513.png
onopen
Screenshot 2024-05-17 164513.png (23.52 KiB) Viewed 123 times

But the authenticator is not called.
Sorry for the silly question but I can’t understand how the login media will call the authenticator.

mboegem:
Hi,

welcome to the forum.

The url you’ve mentioned basically contains all the information you need.
In order to use the stateless login using the authenticator solution.

  1. create a media Login Page.
  2. set the main solution to authenticator type ‘Authenticator’
  3. create the authenticator solution and make sure that you create the ‘onSolutionOpen’ function as explained.
    the onSolutionOpen function can be created directly from the properties at solution level.
    Concerning creation of the authenticator solution: from your main solution right-click the ‘Modules’ node and choose ‘Create new module’, set the solution name and make sure the solution type will become ‘Authenticator’

Based on these 3 steps it already works.

Concerning using LDAP, I’m not familiar with that myself.
However in the onSolutionOpen function you will get username/password which you need to verify against LDAP.
Based on the LDAP authentication result, you can then call ‘security.login’ , which will get you into your main solution.

Hope this helps

Hi, thanks a lot for the answer. The first two steps are quite straightforward, while I’m not sure about the creation of the function “onSolutionOpen” which can be created directly from the properties at solution level.
I have created a function inside the authenticator module in Scopes → Global
Screenshot 2024-05-17 164124.png
function creation
Screenshot 2024-05-17 164124.png (13.04 KiB) Viewed 123 times

Then I called the function on the onOpen method

Screenshot 2024-05-17 164513.png
onopen
Screenshot 2024-05-17 164513.png (23.52 KiB) Viewed 123 times

But the authenticator is not called.
Sorry for the silly question but I can’t understand how the login media will call the authenticator.

mboegem:
Hi,

welcome to the forum.

The url you’ve mentioned basically contains all the information you need.
In order to use the stateless login using the authenticator solution.

  1. create a media Login Page.
  2. set the main solution to authenticator type ‘Authenticator’
  3. create the authenticator solution and make sure that you create the ‘onSolutionOpen’ function as explained.
    the onSolutionOpen function can be created directly from the properties at solution level.
    Concerning creation of the authenticator solution: from your main solution right-click the ‘Modules’ node and choose ‘Create new module’, set the solution name and make sure the solution type will become ‘Authenticator’

Based on these 3 steps it already works.

Concerning using LDAP, I’m not familiar with that myself.
However in the onSolutionOpen function you will get username/password which you need to verify against LDAP.
Based on the LDAP authentication result, you can then call ‘security.login’ , which will get you into your main solution.

Hope this helps