Class EmailAutoConfiguration.OAuth2Configuration

java.lang.Object
io.jmix.autoconfigure.email.EmailAutoConfiguration.OAuth2Configuration
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware
Enclosing class:
EmailAutoConfiguration

@Configuration(proxyBeanMethods=false) @ConditionalOnBooleanProperty(name="jmix.email.oauth2.enabled") public static class EmailAutoConfiguration.OAuth2Configuration extends Object implements org.springframework.beans.factory.BeanClassLoaderAware
  • Field Details

  • Constructor Details

    • OAuth2Configuration

      public OAuth2Configuration()
  • Method Details

    • setBeanClassLoader

      public void setBeanClassLoader(@NonNull ClassLoader classLoader)
      Specified by:
      setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAware
    • microsoftOAuth2TokenProvider

      @Bean("email_MicrosoftOAuth2TokenProvider") @ConditionalOnProperty(name="jmix.email.oauth2.provider", havingValue="microsoft") @ConditionalOnClass(name="com.microsoft.aad.msal4j.ConfidentialClientApplication") @ConditionalOnMissingBean(OAuth2TokenProvider.class) public OAuth2TokenProvider microsoftOAuth2TokenProvider(EmailerProperties emailerProperties, EmailRefreshTokenManager refreshTokenManager)
    • googleOAuth2TokenProvider

      @Bean("email_GoogleOAuth2TokenProvider") @ConditionalOnProperty(name="jmix.email.oauth2.provider", havingValue="google") @ConditionalOnClass(name="com.google.auth.oauth2.UserCredentials") @ConditionalOnMissingBean(OAuth2TokenProvider.class) public OAuth2TokenProvider googleOAuth2TokenProvider(EmailerProperties emailerProperties, EmailRefreshTokenManager refreshTokenManager)
    • microsoftOAuth2DeviceCodeFlow

      @Bean("email_MicrosoftOAuth2DeviceCodeFlow") @ConditionalOnProperty(name="jmix.email.oauth2.provider", havingValue="microsoft") @ConditionalOnClass(name="com.microsoft.aad.msal4j.ConfidentialClientApplication") @ConditionalOnMissingBean(OAuth2DeviceCodeFlow.class) public OAuth2DeviceCodeFlow microsoftOAuth2DeviceCodeFlow(EmailerProperties emailerProperties, EmailRefreshTokenManager refreshTokenManager, SystemAuthenticator systemAuthenticator)
    • microsoftOAuth2AuthorizationCodeFlow

      @Bean("email_MicrosoftOAuth2AuthorizationCodeFlow") @ConditionalOnProperty(name="jmix.email.oauth2.provider", havingValue="microsoft") @ConditionalOnClass(name="com.microsoft.aad.msal4j.ConfidentialClientApplication") @ConditionalOnMissingBean(OAuth2AuthorizationCodeFlow.class) public OAuth2AuthorizationCodeFlow microsoftOAuth2AuthorizationCodeFlow(EmailerProperties emailerProperties, EmailRefreshTokenManager refreshTokenManager)
    • googleOAuth2AuthorizationCodeFlow

      @Bean("email_GoogleOAuth2AuthorizationCodeFlow") @ConditionalOnProperty(name="jmix.email.oauth2.provider", havingValue="google") @ConditionalOnMissingBean(OAuth2AuthorizationCodeFlow.class) public OAuth2AuthorizationCodeFlow googleOAuth2AuthorizationCodeFlow(EmailerProperties emailerProperties, EmailRefreshTokenManager refreshTokenManager)
    • javaMailSender

      @Bean("email_JavaMailSender") public org.springframework.mail.javamail.JavaMailSender javaMailSender(org.springframework.boot.mail.autoconfigure.MailProperties mailProperties, org.springframework.beans.factory.ObjectProvider<OAuth2TokenProvider> tokenProviders, EmailerProperties emailerProperties, org.springframework.beans.factory.ObjectProvider<org.springframework.boot.ssl.SslBundles> sslBundles)
    • validateCredentialProperties

      protected void validateCredentialProperties(EmailerProperties emailerProperties)
    • buildMissingTokenProviderMessage

      protected String buildMissingTokenProviderMessage(@Nullable String provider)
    • isClassMissing

      protected boolean isClassMissing(String className)
    • applyProperties

      protected void applyProperties(org.springframework.mail.javamail.JavaMailSenderImpl sender, org.springframework.boot.mail.autoconfigure.MailProperties properties, org.springframework.boot.ssl.SslBundles sslBundles)
    • asProperties

      protected Properties asProperties(Map<String,String> source)