user data for login

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

user data for login

#1

Postby t4nu » Tue Jan 05, 2016 9:38 am

Hi,
In the training material there is an example for security (login in).
In that example, the user enter the username and password then the username entered be used as the criteria to query the table. If the user is exist and the password matched then the user is allowed to access the application.

Is that the common practice in ebase? What is the different between the user that stored in the table we created with the user that managed by server admin app?
Thanks in advance for the help.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Tue Jan 05, 2016 2:20 pm

There isn't very much difference, they are both stored in a database. Ebase comes supplied with a built-in security system and this is maintained using the server admin app in V5. But you can also use any external security system as well. Plus you can implement your own using database tables - as in the training example.
0 x

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

#3

Postby t4nu » Tue Jan 05, 2016 8:07 pm

In order to access the built-in security system is just from server admin app and cannot from (say) my own program (what I mean with access are; adding new user, change user password, get current login user, etc).

Are there any built-in function to:
* check if user is login in or not
* get current login user's name
* get current login user's role
* change current user's password

Thanks.
Jon wrote:There isn't very much difference, they are both stored in a database. Ebase comes supplied with a built-in security system and this is maintained using the server admin app in V5. But you can also use any external security system as well. Plus you can implement your own using database tables - as in the training example.
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#4

Postby Steve » Wed Jan 06, 2016 10:23 am

You can get to the security manager via Javascript to access things like username, whether a user is logged on etc...

Code: Select all

  system.securityManager.getUserName(); //return the username
  system.securityManager.isUserLoggedOn(); //return true if user is logged on
  system.securityManager.hasRole(name); //check user has a particular role
I do not think that there is a way to change the password through the API.

Kind regards

Steve
0 x

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

#5

Postby t4nu » Wed Jan 06, 2016 10:32 am

Thank you, Steve.
Is there any document with complete description about those system.security things?

Steve wrote:You can get to the security manager via Javascript to access things like username, whether a user is logged on etc...

Code: Select all

  system.securityManager.getUserName(); //return the username
  system.securityManager.isUserLoggedOn(); //return true if user is logged on
  system.securityManager.hasRole(name); //check user has a particular role
I do not think that there is a way to change the password through the API.

Kind regards

Steve
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#6

Postby Steve » Wed Jan 06, 2016 10:36 am

Here is a link to the documentation regarding runtime security:

http://dev-docs.verj.io/ufs/doc/Securit ... cation.htm
0 x

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

#7

Postby t4nu » Wed Jan 06, 2016 10:37 am

Sadly there is no function to add a new user :(
I really need it for auto register system that we currently develop.
Steve wrote:You can get to the security manager via Javascript to access things like username, whether a user is logged on etc...

Code: Select all

  system.securityManager.getUserName(); //return the username
  system.securityManager.isUserLoggedOn(); //return true if user is logged on
  system.securityManager.hasRole(name); //check user has a particular role
I do not think that there is a way to change the password through the API.

Kind regards

Steve
0 x

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

#8

Postby t4nu » Wed Jan 06, 2016 11:05 am

Thanks a lot, Steve.
Is there any step by step tutorial how to implement the logon service?
Steve wrote:Here is a link to the documentation regarding runtime security:

http://dev-docs.verj.io/ufs/doc/Securit ... cation.htm
0 x

kotinkarwak
Ebase User
Posts: 109
Joined: Mon Sep 21, 2015 9:55 pm

#9

Postby kotinkarwak » Wed Jan 06, 2016 1:43 pm

Hi,
I have used MySQL database tables in own implementation of security (or at least what I have understood of security thus far). This will allow to achieve user registration and profile management like password reset etc. Still crude and will tidy it up and share files.
If you need a walk-through, think best to share deskop and speak through it I guess.
0 x
ebasetech v5

Skype: mateso08
Location: Kenya

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

#10

Postby t4nu » Wed Jan 06, 2016 8:32 pm

Then if you already shared it. Please, let me know.
I believe many will get benefit from it.
kotinkarwak wrote:Hi,
I have used MySQL database tables in own implementation of security (or at least what I have understood of security thus far). This will allow to achieve user registration and profile management like password reset etc. Still crude and will tidy it up and share files.
If you need a walk-through, think best to share deskop and speak through it I guess.
0 x

kotinkarwak
Ebase User
Posts: 109
Joined: Mon Sep 21, 2015 9:55 pm

#11

Postby kotinkarwak » Fri Jan 08, 2016 12:59 pm

Will make that project available. Let me go through the documentation of the code and tidy up.

working through this

https://docs.google.com/document/d/1y18 ... sp=sharing
0 x
ebasetech v5

Skype: mateso08
Location: Kenya


Who is online

Users browsing this forum: No registered users and 23 guests