Example: Using custom user attributes

As part of configuring SAML applications, you can use JavaScript to define if users can be authenticated by the service provider (SP) using the custom attribute. In the sample script below, we are defining that all users with access to this application can be authenticated by the service provider (SP) using the custom attribute (IsFull_TimeEmployee). “FullTime” is the corresponding SP attribute.

var um = module("User");
var u = um.GetUserData(null);
var IsFull_TimeEmployee = u.IsFull_TimeEmployee;
setAttribute("FullTime", IsFull_TimeEmployee);
The sample script below is specific to B2B SAML applications:
var fc =LoginUser.Get ("IsFull_TimeEmployee");
setAttribute("FullTime", IsFull_TimeEmployee);