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
| 6604 | * This function is not thread safe, and must be executed within the context |
| 6605 | * of a command or thread safe context. */ |
| 6606 | int RM_DeauthenticateAndCloseClient(RedisModuleCtx *ctx, uint64_t client_id) { |
| 6607 | UNUSED(ctx); |
| 6608 | client *c = lookupClientByID(client_id); |
| 6609 | if (c == NULL) return REDISMODULE_ERR; |
| 6610 | |
| 6611 | /* Revoke also marks client to be closed ASAP */ |
| 6612 | revokeClientAuthentication(c); |
| 6613 | return REDISMODULE_OK; |
| 6614 | } |
| 6615 | |
| 6616 | /* Return the X.509 client-side certificate used by the client to authenticate |
| 6617 | * this connection. |
nothing calls this directly
no test coverage detected