June 19, 2000 - WMLScript's Access Control Pragmas
June 19, 2000 WMLScript's Access Control Pragmas Tips: June 2000
Yehuda Shiran, Ph.D.
|
use access domain
use access domain ;
use access path ;
use access domain path ;
The referring compilation unit's URL must match the access control specification. A URL consists of a domain name and a path. The referring compilation unit's domain name is matched with the access domain specification, while the compilation unit's path is matched with the access path specification. The domain matching is guided by two principles. First, they are suffix matched, i.e. matching is done from right to left. Secondly, entire sub-domain elements mush match. Given the following access control for a compilation unit:
use access domain "webreference.com" path "/js";
The following URLs would be allowed to call the external function in the access-controlled compilation unit above:
http://webreference.com/js/tips.cgi
https://www.webreference.com/js/categories.wmlsc
http://www.webreference.com/js/tools/newtool.cgi?x=123<y=456
But the following URLs would not be allowed to call the external functions:
http://www.microsoft.com/javascript
http://www.webreference.com/dhtml/mytool.cgi
As you can notice, the access path is prefix-matched, i.e. from left to right. The same principles hold here as well, including that entire sub elements must be matched. The path /js
will not match /j/mytools
, for example. By default, access control is disabled, so all external functions have public access.
For more on WMLScript, go to WMLScript Primer.