From your experience, how complex (work days) is it to enable a Smart Client Solution for Single Sign-On in a Windows Server environment?
And are there any points one has to take into account?
function crm_login ()
{
var $user = security.getSystemUserName() ;
security.authenticate('__crm_authenticator','crm_authenticate',[$user]) ;
}
/**
* @param {String} $userName
*/
function crm_authenticate ($userName)
{
globals._user = $userName;
var success = false;
if ( utils.hasRecords ( user_to_employees ) ) // relationship based on globals._user -> system_user_name in employees table which is their Windows login name
{
var uid = security.getUserUID ( user_to_employees.username );
var ds_groups = security.getUserGroups ( uid );
var arr_groups = new Array ( );
if ( ds_groups != null )
for ( k = 1; k <= ds_groups.getMaxRowIndex ( ); k++ )
{
arr_groups.push ( ds_groups.getValue ( k, 2 ) );
}
success = security.login ( user_to_employees.username, uid, arr_groups );
}
else
{
message ( 'no match in employees table' + ' ' )
}
return success;
}
rafig wrote:Basically, you need to still use the Servoy Web Admin page to create users and passwords & assign groups.
Bernd.N wrote:Thank you!rafig wrote:Basically, you need to still use the Servoy Web Admin page to create users and passwords & assign groups.
Is this step necessary? Because we do not use that page to create users and groups inside Servoy.
We handle login directly with help of our own users and groups tables.
We can not change that due to a large user number and because the customer has to be able to administer the users himself without access to the Servoy Web Admin page.
var $user = security.getSystemUserName() ;
Harjo wrote:But how are you sure that users are really authenticated the right way??
I can easily tweak my system user name, so this: getSystemUserName gives the 'wrong' result.
The only way todo this right IMHO is by using the IT2BE LDAP plugin...
This way you can build a secure system with single sign on.
Users browsing this forum: No registered users and 0 guests