RealmSelector Object
Objects of the RealmSelector class are used to execute built-in Steel-Belted Radius Carrier realm selection methods from realm selection scripts. To use the RealmSelector class, scripts must first create an object instance by calling the new RealmSelector() constructor.
Constructor
Constructor
new RealmSelector()
new RealmSelector()
Purpose
The new RealmSelector() constructor is used to create a new object instance of the RealmSelector class.
Syntax
new RealmSelector()
Parameters
Nothing.
Returns
The new RealmSelector() object reference.
Example
new CSTAccessor()
new CSTAccessor()
Purpose
The new CSTAccessor() constructor is used to create a new object instance of the CSTAccessor class.
Syntax
new CSTAccessor(fieldNameArray)
Parameters
Table 148: new CSTAccessor() Parameters
Parameter | Description |
---|---|
fieldNameArray | This is an array of strings and each string is the name of a CST field that may be read in a future Get() operation. If a field is not named in the fieldNameArray parameter, an error is returned if it is an argument to a Get() method for this instance. |
Returns
The new CSTAccessor() object reference. If there is no CST record associated with this JavaScript instance (the current radius transaction), the script terminates and returns SBR_RET_FAILURE.
Example
new SessionControl()
new SessionControl()
Purpose
The new SessionControl() constructor is used to create a new object instance of the SessionControl class.
Syntax
new SessionControl()
Parameters
Nothing.
Returns
The new SessionControl() object reference. If there is no CST record associated with this JavaScript instance, the script terminates and returns SBR_RET_FAILURE.
Example
RealmSelector Methods
RealmSelector Methods
These methods are provided to execute built-in realm selection methods, set the authentication username passed to the selected directed or proxy realm, and set the user profile upon return from the realm.
Execute()
Execute()
Purpose
The Execute() method is used to execute built-in Steel-Belted Radius Carrier realm selection methods.
Syntax
selector.Execute(method)
Parameters
Table 149: Execute() Parameters—RealmSelector Methods
Parameter | Description |
---|---|
method | Specifies the name of the realm selection method: prefix, suffix, dnis, attribute-mapping, or undecorated. |
Returns
The selected realm name or JavaScript null if no realm is matched.
Example
Before you can execute the prefix or suffix built-in methods, you must enable them in the proxy.ini file. If a script has been declared in the [Processing] section of the proxy.ini file, then the prefix and suffix methods are enabled automatically. However, if a script has been declared in an [Inner_Authentication] section of a tunneled .aut file of an authentication method (TTLS, or PEAP), then you must explicitly declare the prefix and suffix methods in the [Processing] section of the proxy.ini file.
SetAuthUserName()
SetAuthUserName()
Purpose
The SetAuthUserName() method is used to set the authentication username for the request.
Syntax
selector.SetAuthUserName(username)
Parameters
Table 150: SetAuthUserName() Parameters—RealmSelector Methods
Parameter | Description |
---|---|
username | Specifies the desired authentication username. |
Returns
Nothing.
Example
SetAuthProfile()
SetAuthProfile()
Purpose
The SetAuthProfile() method is used to set the profile to be returned upon successful authentication.
Syntax
selector.SetAuthProfile(profile)
Parameters
Table 151: SetAuthProfile() Parameters—RealmSelector Methods
Parameter | Description |
---|---|
profile | Specifies the profile name. |
Returns
Nothing.
Example
SetLocationGroupProfile()
SetLocationGroupProfile()
Purpose
The SetLocationGroupProfile() method is used to set the profile to be returned upon successful authentication.
Syntax
selector.SetLocationGroupProfile(profile)
Parameters
Table 152: SetLocationGroupProfile() Parameters—RealmSelector Methods
Parameter | Description |
---|---|
location group profile | Specifies the location group profile name. |
Returns
Nothing.
Example
CSTAccessor Methods
CSTAccessor Methods
These methods are provided to get a field value from the CST for the current session.
Get()
Get()
Purpose
The Get() method is used to get a field value from the CST for the current session.
Syntax
Get(name)
Parameters
Table 153: Get() Parameters—CSTAccessor Methods
Parameter | Description |
---|---|
name | Specifies the name of the CST field. |
Returns
The value of the CST field for this session. For standard fields, the JavaScript type of the return value is similar to the AttributeFilter.Get() method for the attribute used to create a particular field, listed in Table 164. For user-created fields, the JavaScript type is either a string or integer. If the field name passed as a parameter is not one of the fields passed into the constructor, the script terminates and returns a SBR_RET_FAILURE return code.
Example
SetAuthUserName()
SetAuthUserName()
Purpose
The SetAuthUserName() method is used to set the authentication username for the request.
Syntax
selector.SetAuthUserName(username)
Parameters
Table 154: SetAuthUserName() Parameters—CSTAccessor Methods
Parameter | Description |
---|---|
username | Specifies the desired authentication username. |
Returns
Nothing.
Example
SetAuthProfile()
SetAuthProfile()
Purpose
The SetAuthProfile() method is used to set the profile to be returned upon successful authentication.
Syntax
selector.SetAuthProfile(profile)
Parameters
Table 155: SetAuthProfile() Parameters—CSTAccessor Methods
Parameter | Description |
---|---|
profile | Specifies the profile name. |
Returns
Nothing.
Example
SetLocationGroupProfile()
SetLocationGroupProfile()
Purpose
The SetLocationGroupProfile() method is used to set the profile to be returned upon successful authentication.
Syntax
selector.SetLocationGroupProfile(profile)
Parameters
Table 156: SetLocationGroupProfile() Parameters—CSTAccessor Methods
Parameter | Description |
---|---|
location group profile | Specifies the location group profile name. |
Returns
Nothing.