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

Function RM_AuthenticateClientWithACLUser

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

Authenticate the current context's user with the provided redis acl user. * Returns REDISMODULE_ERR if the user is disabled or the user does not exist. * * See authenticateClientWithUser for information about callback, client_id, * and general usage for authentication. */

Source from the content-addressed store, hash-verified

6583 * See authenticateClientWithUser for information about callback, client_id,
6584 * and general usage for authentication. */
6585int RM_AuthenticateClientWithACLUser(RedisModuleCtx *ctx, const char *name, size_t len, RedisModuleUserChangedFunc callback, void *privdata, uint64_t *client_id) {
6586 user *acl_user = ACLGetUserByName(name, len);
6587
6588 if (!acl_user) {
6589 return REDISMODULE_ERR;
6590 }
6591 return authenticateClientWithUser(ctx, acl_user, callback, privdata, client_id);
6592}
6593
6594/* Deauthenticate and close the client. The client resources will not be
6595 * be immediately freed, but will be cleaned up in a background job. This is

Callers

nothing calls this directly

Calls 2

ACLGetUserByNameFunction · 0.85

Tested by

no test coverage detected