![License](https://camo.githubusercontent.com/6bdceb0edee9276c85a44316416af5cccc0b5213bba40c932a154518478611f5/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f6c2f657870726573732e737667)
$ go get -u -v github.com/go-oauth2/redis/v4
package main
import (
"github.com/go-redis/redis/v8"
oredis "github.com/go-oauth2/redis/v4"
"github.com/go-oauth2/oauth2/v4/manage"
)
func main() {
manager := manage.NewDefaultManager()
// use redis token store
manager.MapTokenStorage(oredis.NewRedisStore(&redis.Options{
Addr: "127.0.0.1:6379",
DB: 15,
}))
// use redis cluster store
// manager.MapTokenStorage(oredis.NewRedisClusterStore(&redis.ClusterOptions{
// Addrs: []string{"127.0.0.1:6379"},
// DB: 15,
// }))
}