ory / fosite

Extensible security first OAuth 2.0 and OpenID Connect SDK for Go.
https://www.ory.sh/?utm_source=github&utm_medium=banner&utm_campaign=fosite
Apache License 2.0
2.28k stars 356 forks source link

Can not run the example code #779

Open liuyangc3 opened 7 months ago

liuyangc3 commented 7 months ago

Preflight checklist

Ory Network Project

No response

Describe the bug

I imported fosite latest release v0.44.0 when I run the example code

oauth2 := compose.ComposeAllEnabled(foconfig, store, privateKey)

I got error

../go/pkg/mod/github.com/ory/fosite@v0.44.0/client_authentication_jwks_strategy.go:134:10: s.cache.Wait undefined (type *ristretto.Cache has no field or method Wait)

in client_authentication_jwks_strategy.go:134

func (s *DefaultJWKSFetcherStrategy) WaitForCache() {
    s.cache.Wait()
}

seems version v0.44.0 uses github.com/dgraph-io/ristretto v0.0.3 and in this version they don't have Wait method

Reproducing the bug

use release v0.44.0 and run example

Relevant log output

No response

Relevant configuration

No response

Version

v0.44.0

On which operating system are you observing this issue?

None

In which environment are you deploying?

None

Additional Context

I added below into go.mod file and fixed the issue

replace github.com/dgraph-io/ristretto v0.0.3 => github.com/dgraph-io/ristretto v0.1.1