You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this stage, you'll add support for responding to the `ACL GETUSER` command with the passwords property.
1
+
In this stage, you'll add support for responding to the `ACL GETUSER` command with the `passwords` property.
2
2
3
-
### The `passwords`property
3
+
### The `passwords`Property
4
4
5
-
A user in the Redis ACL system can have zero or more passwords associated with them. The `ACL GETUSER` command also returns the `passwords` property of the specified user.
5
+
The `passwords` property lists all hash-encoded passwords associated with a user.
6
+
7
+
The `default` user does not have any associated passwords unless explicitly configured:
6
8
7
-
Example usage:
8
9
```bash
9
10
> ACL GETUSER default
10
11
1) "flags"
@@ -13,7 +14,10 @@ Example usage:
13
14
4) (empty array)
14
15
```
15
16
16
-
The fourth element of the response is the passwords array. The default user does not have any associated passwords unless explicitly configured. This is why the passwords array is empty for the default user.
17
+
Your `ACL GETUSER` response must now include the following:
18
+
19
+
1. The string `passwords`, encoded as a bulk string.
20
+
2. A RESP array containing the list of passwords. Since the `default` user has none, you must hardcode this to be an empty array.
17
21
18
22
### Tests
19
23
@@ -23,21 +27,20 @@ The tester will execute your program like this:
23
27
$ ./your_program.sh
24
28
```
25
29
26
-
It'll then send an `ACL GETUSER` command specifying the `default` user.
30
+
It will then send an `ACL GETUSER` command specifying the `default` user:
0 commit comments