sonatype/nexus — pull request #451 by mcculls (2012-06-18 17:27:06+00:00)
Title: NXCM-4165: provide task to purge orphaned API keys

This task purges orphaned API Keys linked to external authentication systems where users could be deleted at any time without notifying Nexus. It triggers the new UserPrincipalsExpiredEvent (see security system) which will be listened for by components that cache user principals. These components will then check the cached principals against their original source and remove any whose user has been deleted.

Note that the UserPrincipalsExpiredEvent is also triggered by the security system when removing internal users (in that scenario the event has a specific userId and source).