Package io.jmix.email

Class EmailerProperties.OAuth2

java.lang.Object
io.jmix.email.EmailerProperties.OAuth2
Enclosing class:
EmailerProperties

public static class EmailerProperties.OAuth2 extends Object
  • Field Details

    • enabled

      protected final boolean enabled
      Whether the OAuth2 authentication is enabled
    • provider

      protected final String provider
      Name of SMTP server provider. Required when OAuth2 authentication is enabled, unless a custom OAuth2TokenProvider bean is defined by the application.

      Available values: google, microsoft

    • clientId

      protected final String clientId
      Client id of application to connect via OAuth2. Required when OAuth2 authentication is enabled.
    • secret

      protected final String secret
      Secret of application to connect via OAuth2. Required when OAuth2 authentication is enabled.
    • refreshToken

      protected final String refreshToken
      Initial refresh token value used to get access token. This value is used only while no refresh token is stored in the database. Once a token is stored (via the email connection view or automatically after provider-side token rotation), the stored value takes precedence.
    • tenantId

      protected final String tenantId
      Tenant id used to connect to application provided by Microsoft
    • redirectUri

      protected final String redirectUri
      Redirect URI used by the authorization code flow when connecting a mailbox account. If not set, the URI is derived from the current request. Set it explicitly when the application is behind a reverse proxy and the derived URI is wrong. The value must be registered as a redirect URI of the OAuth client.
  • Constructor Details

    • OAuth2

      public OAuth2(@DefaultValue("false") boolean enabled, @Nullable String provider, @Nullable String clientId, @Nullable String secret, @Nullable String refreshToken, @DefaultValue("common") String tenantId, @Nullable String redirectUri)
  • Method Details

    • isEnabled

      public boolean isEnabled()
      See Also:
    • getProvider

      public @Nullable String getProvider()
      See Also:
    • getClientId

      public @Nullable String getClientId()
      See Also:
    • getSecret

      public @Nullable String getSecret()
      See Also:
    • getRefreshToken

      public @Nullable String getRefreshToken()
      See Also:
    • getTenantId

      public String getTenantId()
      See Also:
    • getRedirectUri

      public @Nullable String getRedirectUri()
      See Also: