-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BucketImpl is not public #41
Comments
That's right. You need to use the builder class. To achieve the snippet that you posted above you would do this: JwkProvider provider = new JwkProviderBuilder("https://samples.auth0.com/")
.rateLimited(10, 1, TimeUnit.MINUTES)
.build(); But if you want to specify a connect/read timeout (I think you forgot to demonstrate that on the snippet) you can't do it today. I'd add a method to the builder rather than changing the visibility of the bucket implementation. I'll leave this open to track it. |
Even better. Sounds great, thank you! |
So I wrote a simple Since that is not possible, I'll try to extend the |
@brix4dayz: You can do to this with UrlJwkProvider. Code copied from README:
|
Unfortunately not, the As a result, it was easier to write a custom |
That's not completely correct. Notice the new URL() passed as parameter to UrlJwkProvider. I have used this for the same reason as you with Keycloak as a provider which has a different URL to the jwks. As the README states : "Also it can load jwks.json file from any given Url (even to a local file in your filesystem)." |
Perfect! Thanks, that makes a lot more sense. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇♂️ |
BucketImpl is not public so I cannot use rate limiting without using
JwkProviderBuilder
. (Also I cannot set a connect and read timeout withJwkProviderBuilder
, otherwise I would have just used it).e.g. this is impossible:
JwkProvider url = new UrlJwkProvider("https://samples.auth0.com/");
Bucket bucket = new Bucket(10, 1, TimeUnit.MINUTES);
JwkProvider provider = new RateLimitJwkProvider(url, bucket);
The text was updated successfully, but these errors were encountered: