public final class Password
extends java.lang.Object
| Constructor and Description |
|---|
Password(PAMService service,
APIRequestHandler rest) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
changePasswordOfAccount(java.lang.String resourceName,
java.lang.String accountName,
java.lang.String newPassword,
sdkEnumConstants.ResetType resetType)
Change the password of the account under a resource using resource and account name
|
boolean |
changePasswordOfAccount(java.lang.String resourceName,
java.lang.String accountName,
java.lang.String newPassword,
sdkEnumConstants.ResetType resetType,
java.lang.String reason,
java.lang.Long ticketID)
Change the password of the account under a resource using resource and account name
|
java.lang.String |
generate(java.lang.String policy)
Generate password based on the password policy
|
java.lang.String |
getPasswordOfAccount(java.lang.String resourceName,
java.lang.String accountName)
Get the password of the account under a resource using resource and account name
|
java.lang.String |
getPasswordOfAccount(java.lang.String resourceName,
java.lang.String accountName,
java.lang.String reason)
Get the password of the account under a resource using resource and account name
|
java.lang.String |
getPasswordOfAccount(java.lang.String resourceName,
java.lang.String accountName,
java.lang.String reason,
long ticketID)
Get the password of the account under a resource using resource and account name
|
org.json.JSONObject |
getPasswordPolicies()
To list all the password policies in the organization.
|
boolean |
validatePassword(java.lang.String password,
long policyId)
To validate the given password based on password policy
|
boolean |
validatePassword(java.lang.String password,
sdkEnumConstants.PasswordPolicy passwordPolicy)
To validate the given password based on password policy
|
public Password(PAMService service, APIRequestHandler rest) throws SDKRegistrationException
SDKRegistrationExceptionpublic java.lang.String generate(java.lang.String policy)
throws SDKConnectionException,
SDKOperationFailedException,
SDKInvalidArgumentException
policy - mandatory, not null, non empty name of password policySDKConnectionException - if unable to connect to the serverSDKOperationFailedException - if server did not provide a proper response for the request, or if action fails. The reason for failure will be provided as a part of the exception's messageSDKInvalidArgumentException - if any of the mandatory field's values are invalid or not providedpublic java.lang.String getPasswordOfAccount(java.lang.String resourceName,
java.lang.String accountName,
java.lang.String reason)
throws SDKConnectionException,
SDKOperationFailedException,
SDKInvalidArgumentException
resourceName - mandatory, not null, non empty name of resourceaccountName - mandatory,not null, non empty unique name of the account whose password is to be fetchedreason - reason for password retrievalSDKConnectionException - if unable to connect to the serverSDKOperationFailedException - if server did not provide a proper response for the request, or if action fails. The reason for failure will be provided as a part of the exception's messageSDKInvalidArgumentException - if any of the mandatory field's values are invalid or not providedpublic java.lang.String getPasswordOfAccount(java.lang.String resourceName,
java.lang.String accountName,
java.lang.String reason,
long ticketID)
throws SDKConnectionException,
SDKOperationFailedException,
SDKInvalidArgumentException
resourceName - mandatory, not null, non empty name of resourceaccountName - mandatory,not null, non empty unique name of the account whose password is to be fetchedreason - reason for password retrievalticketID - If the ticketing system is enabled, you need to pass ticket ID for validationSDKConnectionException - if unable to connect to the serverSDKOperationFailedException - if server did not provide a proper response for the request, or if action fails. The reason for failure will be provided as a part of the exception's messageSDKInvalidArgumentException - if any of the mandatory field's values are invalid or not providedpublic java.lang.String getPasswordOfAccount(java.lang.String resourceName,
java.lang.String accountName)
throws SDKConnectionException,
SDKOperationFailedException,
SDKInvalidArgumentException
resourceName - mandatory, not null, non empty name of resourceaccountName - mandatory,not null, non empty unique name of the account whose password is to be fetchedSDKConnectionException - if unable to connect to the serverSDKOperationFailedException - if server did not provide a proper response for the request, or if action fails. The reason for failure will be provided as a part of the exception's messageSDKInvalidArgumentException - if any of the mandatory field's values are invalid or not providedpublic boolean changePasswordOfAccount(java.lang.String resourceName,
java.lang.String accountName,
java.lang.String newPassword,
sdkEnumConstants.ResetType resetType,
java.lang.String reason,
java.lang.Long ticketID)
throws SDKConnectionException,
SDKOperationFailedException,
SDKInvalidArgumentException
resourceName - mandatory,not null, non empty name of resourceaccountName - mandatory,not null, non empty unique name of the account whose password is to be changednewPassword - mandatory,not null, non empty new passwordresetType - mandatory,not null, type of password resetreason - reason for password change or nullticketID - non negative unique ticket ID or nullSDKConnectionException - if unable to connect to the serverSDKOperationFailedException - if server did not provide a proper response for the request, or if action fails. The reason for failure will be provided as a part of the exception's messageSDKInvalidArgumentException - if any of the mandatory field's values are invalid or not providedpublic boolean changePasswordOfAccount(java.lang.String resourceName,
java.lang.String accountName,
java.lang.String newPassword,
sdkEnumConstants.ResetType resetType)
throws SDKConnectionException,
SDKOperationFailedException,
SDKInvalidArgumentException
resourceName - mandatory,not null, non empty name of resourceaccountName - mandatory,not null, non empty unique name of the account whose password is to be changednewPassword - mandatory,not null, non empty new passwordresetType - mandatory,not null, type of password reset sdkEnumConstants.ResetTypeSDKConnectionException - if unable to connect to the serverSDKOperationFailedException - if server did not provide a proper response for the request, or if action fails. The reason for failure will be provided as a part of the exception's messageSDKInvalidArgumentException - if any of the mandatory field's values are invalid or not providedpublic org.json.JSONObject getPasswordPolicies()
throws SDKConnectionException,
SDKOperationFailedException
SDKConnectionException - if unable to connect to the serverSDKOperationFailedException - if server did not provide a proper response for the request, or if action fails. The reason for failure will be provided as a part of the exception's messageSDKInvalidArgumentException - if any of the mandatory field's values are invalid or not providedpublic boolean validatePassword(java.lang.String password,
sdkEnumConstants.PasswordPolicy passwordPolicy)
throws SDKInvalidArgumentException,
SDKConnectionException,
SDKOperationFailedException
password - mandatory,not null password to be validatedpasswordPolicy - mandatory,type of password policy,based on which password will be validated.SDKConnectionException - if unable to connect to the serverSDKOperationFailedException - if server did not provide a proper response for the request, or if action fails. The reason for failure will be provided as a part of the exception's messageSDKInvalidArgumentException - if any of the mandatory field's values are invalid or not providedpublic boolean validatePassword(java.lang.String password,
long policyId)
throws SDKInvalidArgumentException
password - mandatory,not null password to be validatedpolicyId - mandatory,not negative policy id,based on which password will be validated.SDKConnectionException - if unable to connect to the serverSDKOperationFailedException - if server did not provide a proper response for the request, or if action fails. The reason for failure will be provided as a part of the exception's messageSDKInvalidArgumentException - if any of the mandatory field's values are invalid or not provided