Skip to content

Commit

Permalink
Update usage
Browse files Browse the repository at this point in the history
  • Loading branch information
LyricTian committed Sep 10, 2019
1 parent 7c697bb commit b02ea38
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,22 @@ $ go get -u -v gopkg.in/go-oauth2/redis.v3
package main

import (
"gopkg.in/go-oauth2/redis.v3"
"github.com/go-redis/redis"
oredis "gopkg.in/go-oauth2/redis.v3"
"gopkg.in/oauth2.v3/manage"
)

func main() {
manager := manage.NewDefaultManager()

// use redis token store
manager.MapTokenStorage(redis.NewRedisStore(&redis.Options{
manager.MapTokenStorage(oredis.NewRedisStore(&redis.Options{
Addr: "127.0.0.1:6379",
DB: 15,
}))

// use redis cluster store
// manager.MapTokenStorage(redis.NewRedisClusterStore(&redis.ClusterOptions{
// manager.MapTokenStorage(oredis.NewRedisClusterStore(&redis.ClusterOptions{
// Addrs: []string{"127.0.0.1:6379"},
// DB: 15,
// }))
Expand Down

0 comments on commit b02ea38

Please sign in to comment.