Skip to content
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

- permit to cache Proxy authentication, and to combine with website authentication #83

Conversation

clescot
Copy link
Contributor

@clescot clescot commented Jul 21, 2023

goal : permit to cache Proxy authentication, and to combine it with website authentication :

  • add to CacheKeyProvider the 'applyToProxy' method, to permit to distinguish between a key from a request, and a key from a proxy object.

  • AuthenticationCacheInterceptor use a DefaultRequestCacheKeyProvider or DefaultProxyCacheKeyProvider, to get the right key. autCache is purged, depending if applied against a proxy or request object, AND the related response code.

  • Add DefaultProxyCacheKeyProvider

  • Rename DefaultCacheKeyProvider.java into DefaultRequestCacheKeyProvider

  • update doc to illustrate how to cache proxy authenticaiton (with NetworkInterceptor), and how to combine both authentications (proxy and web site).

…tinguish between a key from a request, and a key from a proxy object.

- AuthenticationCacheInterceptor use a DefaultRequestCacheKeyProvider or DefaultProxyCacheKeyProvider, to get the right key.
autCache is purged, depending if applied against a proxy or request object, AND the related response code.
 - Add DefaultProxyCacheKeyProvider
 - Rename DefaultCacheKeyProvider.java into DefaultRequestCacheKeyProvider
 - update doc to illustrate how to cache proxy authenticaiton (with NetworkInterceptor), and how to combine both authentications (proxy and web site).
Copy link
Owner

@rburgst rburgst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot for your great contribution. I really appreciate it. Could you be so kind to add a new test case for the new features you introduced. As I dont have a test server with which I can replicate that it would take me quite a while to set everything up and come up with a realistic test case.

clescot and others added 8 commits July 24, 2023 16:31
…der.java

Co-authored-by: rburgst <rburgst@gmail.com>
add junit 5 'test' dependency.
add wiremock 'test' dependency.
add a 'test' block to allow junit5 use in gradle.
 - basic authentication for proxy and basic authentication for web site
 - digest authentication for proxy and digest authentication for web site
…ion_in_the_same_time' into allow_proxy_and_site_authentication_in_the_same_time
@clescot
Copy link
Contributor Author

clescot commented Jul 29, 2023

@rburgst : i've updated the pull request based on your comments. Have you any feedback on this new submission ?
best regards,

Charles.

Copy link
Owner

@rburgst rburgst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your great contribution and sorry for the slow responses. I am currently on vacation and reviewing on the phone is a bit tricky. Once I am back I will prepare a new release.

Charles Lescot added 3 commits August 2, 2023 01:23
…ble and fix AuthenticationCacheInterceptorTest mockito content, and modernize assertions.
…ble and fix AuthenticationCacheInterceptorTest mockito content, and modernize assertions.
Copy link
Owner

@rburgst rburgst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome improvements, thanks so much

@rburgst rburgst merged commit 0e7d304 into rburgst:master Aug 3, 2023
1 check passed
@clescot clescot deleted the allow_proxy_and_site_authentication_in_the_same_time branch August 3, 2023 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants