Deauthenticate and close the client. The client resources will not be * be immediately freed, but will be cleaned up in a background job. This is * the recommended way to deauthenicate a client since most clients can't * handle users becoming deauthenticated. Returns REDISMODULE_ERR when the * client doesn't exist and REDISMODULE_OK when the operation was successful. * * The client ID is
| 6796 | * This function is not thread safe, and must be executed within the context |
| 6797 | * of a command or thread safe context. */ |
| 6798 | int RM_DeauthenticateAndCloseClient(RedisModuleCtx *ctx, uint64_t client_id) { |
| 6799 | UNUSED(ctx); |
| 6800 | client *c = lookupClientByID(client_id); |
| 6801 | if (c == NULL) return REDISMODULE_ERR; |
| 6802 | |
| 6803 | /* Revoke also marks client to be closed ASAP */ |
| 6804 | revokeClientAuthentication(c); |
| 6805 | return REDISMODULE_OK; |
| 6806 | } |
| 6807 | |
| 6808 | /* Return the X.509 client-side certificate used by the client to authenticate |
| 6809 | * this connection. |
nothing calls this directly
no test coverage detected