Cleanup all clients that have been authenticated with this module. This * is called from onUnload() to give the module a chance to cleanup any * resources associated with clients it has authenticated. */
| 6648 | * is called from onUnload() to give the module a chance to cleanup any |
| 6649 | * resources associated with clients it has authenticated. */ |
| 6650 | static void moduleFreeAuthenticatedClients(RedisModule *module) { |
| 6651 | listIter li; |
| 6652 | listNode *ln; |
| 6653 | listRewind(g_pserver->clients,&li); |
| 6654 | while ((ln = listNext(&li)) != NULL) { |
| 6655 | client *c = (client*)listNodeValue(ln); |
| 6656 | if (!c->auth_module) continue; |
| 6657 | |
| 6658 | RedisModule *auth_module = (RedisModule *) c->auth_module; |
| 6659 | if (auth_module == module) { |
| 6660 | revokeClientAuthentication(c); |
| 6661 | } |
| 6662 | } |
| 6663 | } |
| 6664 | |
| 6665 | /* Creates a Redis ACL user that the module can use to authenticate a client. |
| 6666 | * After obtaining the user, the module should set what such user can do |
no test coverage detected