Coder Social home page Coder Social logo

redis's People

Contributors

alexhokl avatar lyrictian avatar nightuser avatar nomango avatar tazer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

redis's Issues

error building go-oauth2 redis

Since today I get the following error when building the library in docker on top of
golang:1.12.5-alpine image.

/go/src/gopkg.in/go-oauth2/redis.v3/options.go:78:3: cannot use o.Dialer (type func() (net.Conn, error)) as type func(string, string) (net.Conn, error) in field value

I tried to debug it but i didn't figure it out yet what is causing the error.
Strange is that previous days it was working to build the library
Do you have any idea why?
Quick help will be much appreciated.
Thank you and have a good day!

UPDATE: actually looks like is caused because of this redis/go-redis@3da4357

Cannot use 'redisStore' (type *TokenStore) as the type oauth2.TokenStore

When I use first step of the "Usage", the 'MapTokenStorage' in IntelliJ IDEA show me an error:

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

Cannot use 'redisStore' (type *TokenStore) as the type oauth2.TokenStore
Type does not implement 'oauth2.TokenStore'
need the method: Create(info TokenInfo) error
have the method: Create(ctx context.Context, info oauth2.TokenInfo) error

How can I fix it, thank yours very much!

error in go get or go build

error in go get or go build
go get -u -v gopkg.in/go-oauth2/redis.v3

# gopkg.in/go-oauth2/redis.v3 ..\..\gopath\pkg\mod\gopkg.in\go-oauth2\[email protected]\options.go:79:3: cannot use o.Dialer (type func(context.Context, string, string) (net.Conn, error)) as type func() (net.Conn, error) in field value
Related to this issue #7 error building go-oauth2 redis

Could anyone help fix this?
Thank you very much and have a good day!

Oauth2 refreshes the access_token problem when the refresh_token is not modified

When Oauth2 does not modify the refresh_token, it will continue to refresh the access_token, and the data in redis will continue to increase. Although these data have TTL, if the amount of data is large, there will be certain problems.

The problem can be solved by the following code.

iresult := s.cli.Get(s.wrapperKey(checkToken))
if err := iresult.Err(); err != nil && err != redis.Nil {
	return err
} else if iresult.Val() == "" || iresult.Val() != basicID {
	return s.remove(basicID)
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.