You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
599 B
Markdown
47 lines
599 B
Markdown
# Redis
|
|
|
|
* login docker
|
|
|
|
```sh
|
|
PS> docker exec -it redis-redis_1 sh
|
|
```
|
|
|
|
|
|
|
|
* login redis with password = admin
|
|
|
|
```sh
|
|
$ redis-cli -a admin
|
|
```
|
|
|
|
|
|
|
|
* get key
|
|
|
|
```sh
|
|
127.0.0.1:6379> keys *
|
|
```
|
|
|
|
|
|
|
|
* set key
|
|
|
|
```sh
|
|
127.0.0.1:6379> set keyname 1
|
|
|
|
// set "session_<authToken>" key using for authentication
|
|
127.0.0.1:6379> set session_337fa7c2-8ce2-422f-a335-57569dd7407b_Singapore 1
|
|
```
|
|
|
|
|
|
|
|
* set otp
|
|
|
|
```sh
|
|
set otp_6591808370_signIn 123456
|
|
```
|
|
|
|
* [MD5](https://www.md5hashgenerator.com/) signature of payload
|
|
* security token : c67a06a1-257f-4187-8f7c-6bf1a3d745dc
|
|
|