Skip to content

Set password after each token refresh#643

Merged
ymarcon merged 2 commits into
masterfrom
bugfix/using-old-pwd
Dec 5, 2025
Merged

Set password after each token refresh#643
ymarcon merged 2 commits into
masterfrom
bugfix/using-old-pwd

Conversation

@kazoompa
Copy link
Copy Markdown
Member

@kazoompa kazoompa commented Dec 5, 2025

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements automatic OAuth2 token refresh for the JavaMailSender by updating its password field after each token refresh cycle. This ensures that the mail service continues to use valid OAuth2 access tokens for authentication when sending emails.

  • Updates the OAuth2TokenRefresher to inject JavaMailSenderImpl
  • Sets the refreshed OAuth2 access token as the JavaMailSender password after each token refresh
  • Adds debug logging for the password update operation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread agate-core/src/main/java/org/obiba/agate/config/OAuth2TokenRefresher.java Outdated
Comment thread agate-core/src/main/java/org/obiba/agate/config/OAuth2TokenRefresher.java Outdated
@kazoompa kazoompa requested a review from ymarcon December 5, 2025 15:50
@ymarcon ymarcon merged commit e3e4967 into master Dec 5, 2025
2 checks passed
@ymarcon ymarcon deleted the bugfix/using-old-pwd branch December 5, 2025 15:53
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.

3 participants