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

Remove AuthenticationLoggingInterceptor #1014

Merged
merged 4 commits into from
Jan 23, 2024

Conversation

jeremyg484
Copy link
Contributor

@jeremyg484 jeremyg484 commented Jan 11, 2024

Remove the AuthenticationLoggingInterceptor that was being applied to GoogleCredentials via an AOP proxy.

An alternate solution has been found to be able to detect and log the authentication failures (a separate PR forthcoming).

This will fix the issues with certain methods of GoogleCredentials being unable to be used as expected when proxied due to them being final.

This fix can be applied in a patch release, clearing the way for the alternate authentication support to be part of the next minor release.

This closes #997.

@jeremyg484 jeremyg484 self-assigned this Jan 11, 2024
Copy link
Contributor

@timyates timyates left a comment

Choose a reason for hiding this comment

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

Should we have a test that shows "Calling googleCredentials.refreshIfExpired() followed by googleCredentials.getAccessToken().getTokenValue() results in a null pointer exception." (from the issue) is now working?

(just so we don't break it again in the future?)

@jeremyg484
Copy link
Contributor Author

Should we have a test that shows "Calling googleCredentials.refreshIfExpired() followed by googleCredentials.getAccessToken().getTokenValue() results in a null pointer exception." (from the issue) is now working?

(just so we don't break it again in the future?)

Yes, I think that's a good idea, I'll attempt it. I believe I'll have to add a new mock endpoint to return a "valid" token to get that to work correctly.

Copy link
Contributor

@timyates timyates left a comment

Choose a reason for hiding this comment

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

Nice test! I checked it against master, and it fails as expected 🎉

Added a cleanup: block to the tests to close the application context where applicable 👍

Copy link

sonarcloud bot commented Jan 12, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@sdelamo sdelamo merged commit 83ff86c into master Jan 23, 2024
11 checks passed
@sdelamo sdelamo deleted the remove-authentication-interceptor branch January 23, 2024 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

GoogleCredentials.accessToken method is broken due to #942
3 participants