Article Number
000039014
Applies To
RSA Product Set: SecurID:
RSA Product/Service/Type: Authentication Manager SDK
Issue
The RSA Authentication Manager SDK administrative sample code shows how to enable a new user by implementing the PrincipalDTO.setEnabled() and the AddPrinicpalsCommand.
This article explains how to disable an existing user.
Resolution
The AdminAPIDemos sample code includes the updateUser method demonstrating how to use the UpdatePrincipalCommand and ModificationDTO classes.
This sample code pattern can be extended to include adding a ModificationDTO for the PrincipalDTO.ENABLE_FLAG:
...
//disable user
mod = new ModificationDTO();
mod.setOperation(ModificationDTO.REPLACE_ATTRIBUTE);
mod.setName(PrincipalDTO.ENABLE_FLAG);
mod.setValues(new Object[] { false });
mods.add(mod); // add it to the list
...