From 43adcadd2ccfecc18ad273cab95952c83903278c Mon Sep 17 00:00:00 2001 From: Russ Poetker Date: Mon, 11 Nov 2024 11:08:45 -0500 Subject: [PATCH] Enable xoauth2 mail prop for xoauth2 login --- .../config/spring/email/NihmsMailAuthOauthConfiguration.java | 1 + .../pass/deposit/service/NihmsReceiveMailServiceOauthIT.java | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pass-deposit-services/deposit-core/src/main/java/org/eclipse/pass/deposit/config/spring/email/NihmsMailAuthOauthConfiguration.java b/pass-deposit-services/deposit-core/src/main/java/org/eclipse/pass/deposit/config/spring/email/NihmsMailAuthOauthConfiguration.java index 6b95835f..5d96ca61 100644 --- a/pass-deposit-services/deposit-core/src/main/java/org/eclipse/pass/deposit/config/spring/email/NihmsMailAuthOauthConfiguration.java +++ b/pass-deposit-services/deposit-core/src/main/java/org/eclipse/pass/deposit/config/spring/email/NihmsMailAuthOauthConfiguration.java @@ -63,6 +63,7 @@ public IntegrationFlow imapMailFlowOauth() { private Properties getImapOauthProperties() { Properties javaMailProperties = mailIntegration.getImapDefaultProperties(); javaMailProperties.setProperty("mail.imaps.sasl.mechanisms", "XOAUTH2"); + javaMailProperties.setProperty("mail.imaps.auth.xoauth2.disable", "false"); return javaMailProperties; } diff --git a/pass-deposit-services/deposit-core/src/test/java/org/eclipse/pass/deposit/service/NihmsReceiveMailServiceOauthIT.java b/pass-deposit-services/deposit-core/src/test/java/org/eclipse/pass/deposit/service/NihmsReceiveMailServiceOauthIT.java index 2e9ad1d7..5717dd5b 100644 --- a/pass-deposit-services/deposit-core/src/test/java/org/eclipse/pass/deposit/service/NihmsReceiveMailServiceOauthIT.java +++ b/pass-deposit-services/deposit-core/src/test/java/org/eclipse/pass/deposit/service/NihmsReceiveMailServiceOauthIT.java @@ -17,14 +17,12 @@ import org.eclipse.pass.deposit.DepositApp; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.annotation.Import; import org.springframework.test.context.TestPropertySource; /** * @author Russ Poetker (rpoetke1@jh.edu) */ @SpringBootTest(classes = DepositApp.class) -@Import(OauthTestConfig.class) @TestPropertySource("classpath:test-application.properties") @TestPropertySource(properties = { "nihms.email.oauth.test.it=true",