use of com.sun.identity.entitlement.opensso.PolicyPrivilegeManager in project OpenAM by OpenRock.
the class OpenProvisioning method cleanup.
@AfterClass
public void cleanup() throws SSOException, IdRepoException, EntitlementException {
SSOToken adminToken = (SSOToken) AccessController.doPrivileged(AdminTokenAction.getInstance());
AMIdentityRepository amir = new AMIdentityRepository(adminToken, "/");
Set<AMIdentity> identities = new HashSet<AMIdentity>();
identities.add(jSmith);
identities.add(johnDoe);
identities.add(branchMgr);
amir.deleteIdentities(identities);
PrivilegeManager pMgr = new PolicyPrivilegeManager(applicationServiceFactory, resourceTypeService, constraintValidator);
pMgr.initialize("/", SubjectUtils.createSubject(adminToken));
pMgr.remove(PRIVILEGE_NAME);
}
Aggregations