39장. mail Microsoft Oauth


Camel 3.18.4 이후.

mail Microsoft OAuth2는 org.apache.camel.component.mail.mail.>-<Authenticator 를 구현하여 skopeo/POP/SMTP 연결을 인증하고 Spring의 mail 지원 및 기본 Java3-4 시스템을 통해 이메일에 액세스할 수 있습니다.

이 구성 요소에 대해 pom.xml 에 다음 종속성을 추가합니다.

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-mail-microsoft-oauth</artifactId>
    <version>3.20.1.redhat-00031</version>
    <!-- use the same version as your Camel core version -->
</dependency>
Copy to Clipboard Toggle word wrap

camel-mail-microsoft-oauth 가져오기는 camel-mail 구성 요소를 자동으로 가져옵니다.

39.1. Microsoft Exchange Online OAuth2 mail Authenticator Authenticator sample

OAuth를 사용하려면 Azure Active Directory에 애플리케이션을 등록해야 합니다. 지침에 따라 새 애플리케이션을 등록합니다.

절차

  1. 애플리케이션을 사용하여 클라이언트 자격 증명 흐름을 통해 Exchange loss에 액세스할 수 있습니다. 자세한 내용은 OAuth를 사용한 Manila, POP 또는 SMTP 연결을참조하십시오.
  2. 모든 것이 설정되면 레지스트리, org.apache.camel.component.mail.MicrosoftExchangeOnlineOAuth2>-<Authenticator 의 인스턴스 레지스트리를 선언하고 등록합니다.
  3. 예를 들어 Spring Boot 애플리케이션에서는 다음을 수행합니다.
@BindToRegistry("auth")
public MicrosoftExchangeOnlineOAuth2MailAuthenticator exchangeAuthenticator(){
    return new MicrosoftExchangeOnlineOAuth2MailAuthenticator(tenantId, clientId, clientSecret, "jon@doe.com");
}
Copy to Clipboard Toggle word wrap
  1. 그런 다음 Camel URI에서 다음과 같이 참조합니다.
 from("imaps://outlook.office365.com:993"
                    +  "?authenticator=#auth"
                    +  "&mail.imaps.auth.mechanisms=XOAUTH2"
                    +  "&debugMode=true"
                    +  "&delete=false")
Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat