Class AppConfig


  • public class AppConfig
    extends Object
    Configuration for a Slack App.
    • Constructor Detail

      • AppConfig

        public AppConfig()
      • AppConfig

        public AppConfig​(Slack slack,
                         ExecutorServiceProvider executorServiceProvider,
                         String singleTeamBotToken,
                         String signingSecret,
                         String verificationToken,
                         boolean oAuthInstallPathEnabled,
                         boolean oAuthStartEnabled,
                         boolean openIDConnectEnabled,
                         boolean oAuthRedirectUriPathEnabled,
                         boolean oAuthCallbackEnabled,
                         boolean oAuthInstallPageRenderingEnabled,
                         OAuthInstallPageRenderer oAuthInstallPageRenderer,
                         OAuthRedirectUriPageRenderer oAuthRedirectUriPageRenderer,
                         UnmatchedRequestHandler unmatchedRequestHandler,
                         boolean authTestCacheEnabled,
                         long authTestCacheExpirationMillis,
                         boolean classicAppPermissionsEnabled,
                         int threadPoolSize,
                         String clientId,
                         String clientSecret,
                         String redirectUri,
                         String scope,
                         String userScope,
                         long tokenRotationExpirationMillis,
                         String appPath,
                         String oauthStartPath,
                         String oauthInstallPath,
                         String oauthCallbackPath,
                         String oauthRedirectUriPath,
                         boolean stateValidationEnabled,
                         String oauthCancellationUrl,
                         String oauthCompletionUrl,
                         boolean alwaysRequestUserTokenNeeded,
                         boolean appInitializersEnabled,
                         boolean subtypedMessageEventsAutoAckEnabled,
                         boolean allEventsApiAutoAckEnabled,
                         boolean sslCheckEnabled,
                         boolean requestVerificationEnabled,
                         boolean ignoringSelfEventsEnabled)
    • Method Detail

      • isDistributedApp

        public boolean isDistributedApp()
      • isOAuthInstallPathEnabled

        public boolean isOAuthInstallPathEnabled()
      • isOAuthStartEnabled

        @Deprecated
        public boolean isOAuthStartEnabled()
        Deprecated.
      • setOAuthStartEnabled

        @Deprecated
        public void setOAuthStartEnabled​(boolean enabled)
        Deprecated.
      • isOAuthRedirectUriPathEnabled

        public boolean isOAuthRedirectUriPathEnabled()
      • isOAuthCallbackEnabled

        @Deprecated
        public boolean isOAuthCallbackEnabled()
        Deprecated.
      • setOAuthCallbackEnabled

        @Deprecated
        public void setOAuthCallbackEnabled​(boolean enabled)
        Deprecated.
      • getOauthStartRequestURI

        @Deprecated
        public String getOauthStartRequestURI()
        Deprecated.
      • getOauthInstallRequestURI

        public String getOauthInstallRequestURI()
      • getOauthCallbackRequestURI

        @Deprecated
        public String getOauthCallbackRequestURI()
        Deprecated.
      • getOauthRedirectUriRequestURI

        public String getOauthRedirectUriRequestURI()
      • setOauthStartPath

        @Deprecated
        public void setOauthStartPath​(String oauthStartPath)
        Deprecated.
      • getOauthInstallPath

        public String getOauthInstallPath()
      • setOauthInstallPath

        public void setOauthInstallPath​(String oauthInstallPath)
      • getOauthCallbackPath

        @Deprecated
        public String getOauthCallbackPath()
        Deprecated.
      • setOauthCallbackPath

        @Deprecated
        public void setOauthCallbackPath​(String oauthCallbackPath)
        Deprecated.
      • getOauthRedirectUriPath

        public String getOauthRedirectUriPath()
      • setOauthRedirectUriPath

        public void setOauthRedirectUriPath​(String oauthRedirectUriPath)
      • getSlack

        public Slack getSlack()
      • getSingleTeamBotToken

        public String getSingleTeamBotToken()
      • getSigningSecret

        public String getSigningSecret()
      • getVerificationToken

        @Deprecated
        public String getVerificationToken()
        Deprecated.
      • isOpenIDConnectEnabled

        public boolean isOpenIDConnectEnabled()
      • isOAuthInstallPageRenderingEnabled

        public boolean isOAuthInstallPageRenderingEnabled()
        If you prefer the behavior in v1.0 - 1.3, set this flag as false
      • getOAuthInstallPageRenderer

        public OAuthInstallPageRenderer getOAuthInstallPageRenderer()
        Renders the web page content to display to installers.
      • getOAuthRedirectUriPageRenderer

        public OAuthRedirectUriPageRenderer getOAuthRedirectUriPageRenderer()
        Renders the web page content to display to installers.
      • getUnmatchedRequestHandler

        public UnmatchedRequestHandler getUnmatchedRequestHandler()
        Handles unmatched requests (default behavior is simply returning 404 Not Found).
      • isAuthTestCacheEnabled

        public boolean isAuthTestCacheEnabled()
        Returns true if auth.test call result cache in MultiTeamsAuthorization middleware is enabled. The default is false.
      • getAuthTestCacheExpirationMillis

        public long getAuthTestCacheExpirationMillis()
        Returns the millisecond value to keep cached auth.test response in cache. Negative value indicates the cache is permanent. The default is 10 minutes.
      • isClassicAppPermissionsEnabled

        public boolean isClassicAppPermissionsEnabled()
      • getThreadPoolSize

        public int getThreadPoolSize()
        The thread pool size for the built-in handy executor service.
      • getClientId

        public String getClientId()
      • getClientSecret

        public String getClientSecret()
      • getRedirectUri

        public String getRedirectUri()
      • getScope

        public String getScope()
      • getUserScope

        public String getUserScope()
      • getTokenRotationExpirationMillis

        public long getTokenRotationExpirationMillis()
      • getAppPath

        public String getAppPath()
      • isStateValidationEnabled

        public boolean isStateValidationEnabled()
        Enables validation of the state parameter in the OAuth flow. It is highly recommended to enable this validation for better security. A valid exception is when Enterprise Grid Org admins install apps from the app management page.
      • getOauthCancellationUrl

        public String getOauthCancellationUrl()
      • getOauthCompletionUrl

        public String getOauthCompletionUrl()
      • isAlwaysRequestUserTokenNeeded

        public boolean isAlwaysRequestUserTokenNeeded()
      • isAppInitializersEnabled

        public boolean isAppInitializersEnabled()
      • isSubtypedMessageEventsAutoAckEnabled

        public boolean isSubtypedMessageEventsAutoAckEnabled()
        Automatically acknowledge message events that have subtype if true. Find the list of available subtypes at https://api.slack.com/events/message#subtypes
      • isAllEventsApiAutoAckEnabled

        public boolean isAllEventsApiAutoAckEnabled()
        Automatically acknowledge all Event API events if true. This behavior is compatible with bolt-js.
      • isSslCheckEnabled

        public boolean isSslCheckEnabled()
      • isRequestVerificationEnabled

        public boolean isRequestVerificationEnabled()
      • isIgnoringSelfEventsEnabled

        public boolean isIgnoringSelfEventsEnabled()
      • setSlack

        public void setSlack​(Slack slack)
      • setExecutorServiceProvider

        public void setExecutorServiceProvider​(ExecutorServiceProvider executorServiceProvider)
      • setSingleTeamBotToken

        public void setSingleTeamBotToken​(String singleTeamBotToken)
      • setSigningSecret

        public void setSigningSecret​(String signingSecret)
      • setVerificationToken

        @Deprecated
        public void setVerificationToken​(String verificationToken)
        Deprecated.
      • setOAuthInstallPathEnabled

        public void setOAuthInstallPathEnabled​(boolean oAuthInstallPathEnabled)
      • setOpenIDConnectEnabled

        public void setOpenIDConnectEnabled​(boolean openIDConnectEnabled)
      • setOAuthRedirectUriPathEnabled

        public void setOAuthRedirectUriPathEnabled​(boolean oAuthRedirectUriPathEnabled)
      • setOAuthInstallPageRenderingEnabled

        public void setOAuthInstallPageRenderingEnabled​(boolean oAuthInstallPageRenderingEnabled)
        If you prefer the behavior in v1.0 - 1.3, set this flag as false
      • setOAuthInstallPageRenderer

        public void setOAuthInstallPageRenderer​(OAuthInstallPageRenderer oAuthInstallPageRenderer)
        Renders the web page content to display to installers.
      • setOAuthRedirectUriPageRenderer

        public void setOAuthRedirectUriPageRenderer​(OAuthRedirectUriPageRenderer oAuthRedirectUriPageRenderer)
        Renders the web page content to display to installers.
      • setUnmatchedRequestHandler

        public void setUnmatchedRequestHandler​(UnmatchedRequestHandler unmatchedRequestHandler)
        Handles unmatched requests (default behavior is simply returning 404 Not Found).
      • setAuthTestCacheEnabled

        public void setAuthTestCacheEnabled​(boolean authTestCacheEnabled)
        Returns true if auth.test call result cache in MultiTeamsAuthorization middleware is enabled. The default is false.
      • setAuthTestCacheExpirationMillis

        public void setAuthTestCacheExpirationMillis​(long authTestCacheExpirationMillis)
        Returns the millisecond value to keep cached auth.test response in cache. Negative value indicates the cache is permanent. The default is 10 minutes.
      • setClassicAppPermissionsEnabled

        public void setClassicAppPermissionsEnabled​(boolean classicAppPermissionsEnabled)
      • setThreadPoolSize

        public void setThreadPoolSize​(int threadPoolSize)
        The thread pool size for the built-in handy executor service.
      • setClientId

        public void setClientId​(String clientId)
      • setClientSecret

        public void setClientSecret​(String clientSecret)
      • setRedirectUri

        public void setRedirectUri​(String redirectUri)
      • setScope

        public void setScope​(String scope)
      • setUserScope

        public void setUserScope​(String userScope)
      • setTokenRotationExpirationMillis

        public void setTokenRotationExpirationMillis​(long tokenRotationExpirationMillis)
      • setAppPath

        public void setAppPath​(String appPath)
      • setStateValidationEnabled

        public void setStateValidationEnabled​(boolean stateValidationEnabled)
        Enables validation of the state parameter in the OAuth flow. It is highly recommended to enable this validation for better security. A valid exception is when Enterprise Grid Org admins install apps from the app management page.
      • setOauthCancellationUrl

        public void setOauthCancellationUrl​(String oauthCancellationUrl)
      • setOauthCompletionUrl

        public void setOauthCompletionUrl​(String oauthCompletionUrl)
      • setAlwaysRequestUserTokenNeeded

        public void setAlwaysRequestUserTokenNeeded​(boolean alwaysRequestUserTokenNeeded)
      • setAppInitializersEnabled

        public void setAppInitializersEnabled​(boolean appInitializersEnabled)
      • setSubtypedMessageEventsAutoAckEnabled

        public void setSubtypedMessageEventsAutoAckEnabled​(boolean subtypedMessageEventsAutoAckEnabled)
        Automatically acknowledge message events that have subtype if true. Find the list of available subtypes at https://api.slack.com/events/message#subtypes
      • setAllEventsApiAutoAckEnabled

        public void setAllEventsApiAutoAckEnabled​(boolean allEventsApiAutoAckEnabled)
        Automatically acknowledge all Event API events if true. This behavior is compatible with bolt-js.
      • setSslCheckEnabled

        public void setSslCheckEnabled​(boolean sslCheckEnabled)
      • setRequestVerificationEnabled

        public void setRequestVerificationEnabled​(boolean requestVerificationEnabled)
      • setIgnoringSelfEventsEnabled

        public void setIgnoringSelfEventsEnabled​(boolean ignoringSelfEventsEnabled)
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object