emit event when removing OAuth2Client record

master
rob 2 years ago
parent 4993b167de
commit 5203c249c6

@ -464,6 +464,10 @@ class OAuth2Service extends SiteService {
* @param {OAuth2Client} client the client to be removed
*/
async removeClient (client) {
// provides opportunity to allow or disallow and, if allowed, perform any
// additional cleanup needed when removing a client.
await this.emitDtpEvent('client.remove', client);
this.log.info('removing client', { clientId: client._id, });
await OAuth2Client.deleteOne({ _id: client._id });
}

Loading…
Cancel
Save