Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,16 @@ private void deleteAssociatedOAuthApps(ServiceProvider serviceProvider, String t
throws IdentityOAuthAdminException, IdentityOAuth2Exception {

Set<String> associatedOAuthConsumerKeys = getOAuthAppsAssociatedWithApplication(serviceProvider);
// Remove cache entries before deleting OAuth app data, since cache cleanup
// needs to look up app information that would no longer exist after deletion.
removeEntriesFromCache(associatedOAuthConsumerKeys);
Comment on lines +212 to +214
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log Improvement Suggestion No: 1

Suggested change
// Remove cache entries before deleting OAuth app data, since cache cleanup
// needs to look up app information that would no longer exist after deletion.
removeEntriesFromCache(associatedOAuthConsumerKeys);
// Remove cache entries before deleting OAuth app data, since cache cleanup
// needs to look up app information that would no longer exist after deletion.
log.info("Removing cache entries for OAuth apps associated with application: " + serviceProvider.getApplicationName() + ", tenantDomain: " + tenantDomain);
removeEntriesFromCache(associatedOAuthConsumerKeys);

for (String consumerKey : associatedOAuthConsumerKeys) {
if (log.isDebugEnabled()) {
log.debug("Removing OAuth application data for clientId: " + consumerKey + " associated with " +
"application: " + serviceProvider.getApplicationName() + " tenantDomain: " + tenantDomain);
}
OAuth2ServiceComponentHolder.getInstance().getOAuthAdminService().removeOAuthApplicationData(consumerKey);
}
removeEntriesFromCache(associatedOAuthConsumerKeys);
}

public void onPreCreateInbound(ServiceProvider serviceProvider, boolean isUpdate) throws
Expand Down