Authenticator mode in NgClient versions 2024.3.1

Q&A regarding installation and issues getting started with Servoy

Authenticator mode in NgClient versions 2024.3.1

Postby andrea.caria » Fri May 17, 2024 10:50 am

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 https://docs.servoy.com/guides/develop/security/authentication#authenticator
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
Attachments
Screenshot 2024-05-17 104715.png
Propeties
Screenshot 2024-05-17 104715.png (29.88 KiB) Viewed 1262 times
andrea.caria
 
Posts: 4
Joined: Fri May 17, 2024 10:37 am

Re: Authenticator mode in NgClient versions 2024.3.1

Postby mboegem » Fri May 17, 2024 3:59 pm

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
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1765
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Authenticator mode in NgClient versions 2024.3.1

Postby andrea.caria » Fri May 17, 2024 4:50 pm

Hi [quote="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
Screenshot 2024-05-17 164124.png
function creation
Screenshot 2024-05-17 164124.png (13.04 KiB) Viewed 1218 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 1218 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.
andrea.caria
 
Posts: 4
Joined: Fri May 17, 2024 10:37 am

Re: Authenticator mode in NgClient versions 2024.3.1

Postby andrea.caria » Wed May 22, 2024 12:33 pm

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 wrote: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
andrea.caria
 
Posts: 4
Joined: Fri May 17, 2024 10:37 am

Re: Authenticator mode in NgClient versions 2024.3.1

Postby andrea.caria » Wed May 22, 2024 12:33 pm

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 wrote: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
andrea.caria
 
Posts: 4
Joined: Fri May 17, 2024 10:37 am


Return to I'm just getting started

Who is online

Users browsing this forum: No registered users and 1 guest

cron