Custom authentication and Login()

I am trying to implement some custom authentication using Login and Authentication solutions. I have created my own user and group db and tables, because I need to extend what the default Servoy implementation provides. In other words I am not using the repository and not using Servoy’s own authentication.

Given the above, from the examples that I have looked at I am unclear as to how much I need to handle myself.

In my authentication solution, I can validate the supplied user name and password against my own user table with my own code, but do I also need to call security.login() to let Servoy know or something ?

If my authentication solution returns a true to the login solution, do I need to handle that myself and manually launch the first form, or should Servoy be doing that automatically as it would if I were using Servoy’s own security ?

Alan,

Have you seen this:
http://wiki.servoy.com/display/public/D … g+Security

Servoy runs the authenticator in the server when the client calls security.authenticate() in the login solution.
When in the authenticator, security.login() is called, the calling client will switch automatically from login solution to first form of main solution.
When the authenticator does not call security.login() (for example because the password was wrong), the calling client will stay in the login solution.

Note that you can also use the security.authenticate() method to retrieve some data stored in the db, you may need this because as long as the calling client is not logged in it has no db access.

Hope this helps.

Rob

Thanks Rob.

Yes I was working from that documentation that you linked to.

What I have is my own tables in my own DB that I am using to hold user login details (because I need to have additional information there, and did not want to modify the Servoy repository schema). So in my Authenticate() code I just validate the supplied user name and password against my own tables.

What I am confused about it whether I need to call security.login() in this scenario. Or should returning true from the authentication module enough ?

Alan,

Servoy triggers on the security.login() call in the authenticator solution, the returned value from the method is ignored (it is passed to the security.authenticate()) caller.

Rob

hello, i’m new user of Servoy developer

i need help te realise a solution like this:

-in the solution users must login with a user name and a password
-for a firs connexion he need to redefine his password
-the password expire each 3 mouth

help pls