Skip to content

Commit

Permalink
improve application deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
Thumimku committed Nov 7, 2023
1 parent 904d3ed commit 433a483
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5393,9 +5393,13 @@ private void deleteAndroidAttestationCredentials(ServiceProvider application)
throws IdentityApplicationManagementException {

try {
ApplicationManagementServiceComponentHolder.getInstance()
.getSecretManager().deleteSecret(APPLICATION_SECRET_TYPE_ANDROID_ATTESTATION_CREDENTIALS,
getAndroidAttestationSecretName(application.getApplicationResourceId()));
if (ApplicationManagementServiceComponentHolder.getInstance()
.getSecretManager().isSecretExist(APPLICATION_SECRET_TYPE_ANDROID_ATTESTATION_CREDENTIALS,
getAndroidAttestationSecretName(application.getApplicationResourceId()))) {
ApplicationManagementServiceComponentHolder.getInstance()
.getSecretManager().deleteSecret(APPLICATION_SECRET_TYPE_ANDROID_ATTESTATION_CREDENTIALS,
getAndroidAttestationSecretName(application.getApplicationResourceId()));
}
} catch (SecretManagementException e) {
throw new IdentityApplicationManagementException("Failed to delete Android Attestation " +
"Service Credentials for service provider with id: " + application.getApplicationID(), e);
Expand Down

0 comments on commit 433a483

Please sign in to comment.