MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / RM_AuthenticateClientWithACLUser

Function RM_AuthenticateClientWithACLUser

src/module.cpp:6777–6784  ·  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

6775 * See authenticateClientWithUser for information about callback, client_id,
6776 * and general usage for authentication. */
6777int RM_AuthenticateClientWithACLUser(RedisModuleCtx *ctx, const char *name, size_t len, RedisModuleUserChangedFunc callback, void *privdata, uint64_t *client_id) {
6778 user *acl_user = ACLGetUserByName(name, len);
6779
6780 if (!acl_user) {
6781 return REDISMODULE_ERR;
6782 }
6783 return authenticateClientWithUser(ctx, acl_user, callback, privdata, client_id);
6784}
6785
6786/* Deauthenticate and close the client. The client resources will not be
6787 * 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