-
Notifications
You must be signed in to change notification settings - Fork 15
User status
Use this guide to to retrieve end user statuses through the SecureAuth Identity Management API and to check the status of end users, unlock locked-out users, disable users, and more.
To receive detailed statuses from Active Directory, you must enable the Advanced AD User Check option in the SecureAuth IdP Data tab. If the option is disabled, you will receive incorrect statuses.
Retrieves the user's status from the username in the endpoint URL and returns a response.
userId
- The user ID that you want to get status.
BaseResponse
- Returns a BaseResponse with status, message and user id.
BaseResponse getUserStatus(String userId);
Method invokes a status to the user Id.
userId
- The User ID that you want to change status.
status
- The new status [lock, unlock, enable, disable].
BaseResponse
- Returns a BaseResponse with status, message and user id.
BaseResponse setUserStatus(String userId, String status)
First you should create an Instances of SAAccess object which represent the connections and which can be used to query the API.
private String applianceHost = "yourhost.com";
private String appliancePort = "443";
private boolean applianceSSL = true;
private boolean selfSigned = true;
private String realm = "realmId";
private String applicationID = "appID";
private String applicationKey = "appKey";
SAAccess saAccess = new SAAccess(applianceHost, appliancePort, applianceSSL,
selfSigned, realm, applicationID, applicationKey);
try {
BaseResponse baseResponse = saAccess.getUserStatus("foobar");
BaseResponse baseResponse = saAccess.setUserStatus("foobar", "disable");
BaseResponse baseResponse = saAccess.getUserStatus("foobar");
}catch (SARestAPIException e){
//handle exception
}
Available from 1.0.5.3