proc revokeUser {realm userid} {
global AdminControl AdminConfig
if {[catch {$AdminControl queryNames WebSphere:type=SecurityAdmin,*}
result]} {
puts stdout "\$AdminControl queryNames WebSphere:type=SecurityAdmin,*
caught an exception $result\n"
return
} else {
if {$result != {}} {
foreach secBean $result {
if {$secBean != {} || $secBean != "null"} {
if {[catch {$AdminControl invoke $secBean
purgeUserFromAuthCache "$realm $userid"} result]} {
puts stdout "\$AdminControl invoke $secBean
purgeUserFromAuthCache $realm $userid caught an
exception $result\n"
return
} else {
puts stdout "\nUser $userid has been purged from the
cache of process $secBean\n"
}
} else {
puts stdout "unable to get securityAdmin Mbean, user
$userid not revoked"
}
}
} else {
puts stdout "Security Mbean was not found\n"
return
}
}
return true
}
Related concepts
Programmatic login