
98 Enterprise Business Portals II with IBM Tivoli Access Manager
Example 3-16 doAs method
boolean worked;
java.security.Permission whatTheyWant =
new PDPermission(rsc, act);
try {
sm.checkPermission(whatTheyWant);
worked = true;
} catch (AccessControlException e) {
worked = false;
}
CheckJaas.this.setPermValue(worked);
For our example, we have to change the name of the requested resource, as
shown in Example 3-17.
Example 3-17 changeName method
if (rcvRsc.equals("www.aaa.com")){
return "/WebService/App1";
} else {
return "/WebService/Deny";
}
The value that is given to this bean is formatted as a URL. Since Tivoli Access
Manager determines the permissions ...