The following example assigns the authentication scheme HTML Authentication to all the realms in the domain Acme North Domain:
use Netegrity::PolicyMgtAPI;
$policyapi = Netegrity::PolicyMgtAPI‑>New();
$session = $policyapi‑>CreateSession("adminid", "adminpwd");
$domain = $session‑>GetDomain("Acme North Domain");
$authscheme=$session‑>GetAuthScheme("HTML Authentication");
@realms=$domain‑>GetAllRealms();
print "Updating these realms to auth scheme ".$authscheme‑>Name();
foreach $realm(@realms) {
$name=$realm‑>Name();
if ($realm‑>AuthScheme($authscheme)==undef) {
print "\n Couldn't update realm " . $name;
}
else {
print "\n Realm ". $name;
}
}
|
Copyright © 2012 CA Technologies.
All rights reserved.
|
|