MCPcopy Create free account
hub / github.com/F-Stack/f-stack / moduleNotifyUserChanged

Function moduleNotifyUserChanged

app/redis-6.2.6/src/module.c:6423–6434  ·  view source on GitHub ↗

This function is called when a client's user has changed and invokes the * client's user changed callback if it was set. This callback should * cleanup any state the module was tracking about this client. * * A client's user can be changed through the AUTH command, module * authentication, and when a client is freed. */

Source from the content-addressed store, hash-verified

6421 * A client's user can be changed through the AUTH command, module
6422 * authentication, and when a client is freed. */
6423void moduleNotifyUserChanged(client *c) {
6424 if (c->auth_callback) {
6425 c->auth_callback(c->id, c->auth_callback_privdata);
6426
6427 /* The callback will fire exactly once, even if the user remains
6428 * the same. It is expected to completely clean up the state
6429 * so all references are cleared here. */
6430 c->auth_callback = NULL;
6431 c->auth_callback_privdata = NULL;
6432 c->auth_module = NULL;
6433 }
6434}
6435
6436void revokeClientAuthentication(client *c) {
6437 /* Freeing the client would result in moduleNotifyUserChanged() to be

Callers 5

freeClientFunction · 0.85
resetCommandFunction · 0.85
ACLAuthenticateUserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected