Package com.slack.api.bolt
Class AppConfig
- java.lang.Object
-
- com.slack.api.bolt.AppConfig
-
public class AppConfig extends Object
Configuration for a Slack App.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AppConfig.AppConfigBuilder
static class
AppConfig.EnvVariableName
-
Constructor Summary
Constructors Constructor Description AppConfig()
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 Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static AppConfig.AppConfigBuilder
builder()
protected boolean
canEqual(Object other)
boolean
equals(Object o)
String
getAppPath()
long
getAuthTestCacheExpirationMillis()
Returns the millisecond value to keep cached auth.test response in cache.String
getClientId()
String
getClientSecret()
ExecutorServiceProvider
getExecutorServiceProvider()
String
getOauthCallbackPath()
Deprecated.String
getOauthCallbackRequestURI()
Deprecated.String
getOauthCancellationUrl()
String
getOauthCompletionUrl()
OAuthInstallPageRenderer
getOAuthInstallPageRenderer()
Renders the web page content to display to installers.String
getOauthInstallPath()
String
getOauthInstallRequestURI()
OAuthRedirectUriPageRenderer
getOAuthRedirectUriPageRenderer()
Renders the web page content to display to installers.String
getOauthRedirectUriPath()
String
getOauthRedirectUriRequestURI()
String
getOauthStartPath()
Deprecated.String
getOauthStartRequestURI()
Deprecated.String
getRedirectUri()
String
getScope()
String
getSigningSecret()
String
getSingleTeamBotToken()
Slack
getSlack()
int
getThreadPoolSize()
The thread pool size for the built-in handy executor service.long
getTokenRotationExpirationMillis()
UnmatchedRequestHandler
getUnmatchedRequestHandler()
Handles unmatched requests (default behavior is simply returning 404 Not Found).String
getUserScope()
String
getVerificationToken()
Deprecated.int
hashCode()
boolean
isAllEventsApiAutoAckEnabled()
Automatically acknowledge all Event API events if true.boolean
isAlwaysRequestUserTokenNeeded()
boolean
isAppInitializersEnabled()
boolean
isAuthTestCacheEnabled()
Returns true if auth.test call result cache in MultiTeamsAuthorization middleware is enabled.boolean
isClassicAppPermissionsEnabled()
boolean
isDistributedApp()
boolean
isIgnoringSelfEventsEnabled()
boolean
isOAuthCallbackEnabled()
Deprecated.boolean
isOAuthInstallPageRenderingEnabled()
If you prefer the behavior in v1.0 - 1.3, set this flag as falseboolean
isOAuthInstallPathEnabled()
boolean
isOAuthRedirectUriPathEnabled()
boolean
isOAuthStartEnabled()
Deprecated.boolean
isOpenIDConnectEnabled()
boolean
isRequestVerificationEnabled()
boolean
isSslCheckEnabled()
boolean
isStateValidationEnabled()
Enables validation of the state parameter in the OAuth flow.boolean
isSubtypedMessageEventsAutoAckEnabled()
Automatically acknowledge message events that have subtype if true.void
setAllEventsApiAutoAckEnabled(boolean allEventsApiAutoAckEnabled)
Automatically acknowledge all Event API events if true.void
setAlwaysRequestUserTokenNeeded(boolean alwaysRequestUserTokenNeeded)
void
setAppInitializersEnabled(boolean appInitializersEnabled)
void
setAppPath(String appPath)
void
setAuthTestCacheEnabled(boolean authTestCacheEnabled)
Returns true if auth.test call result cache in MultiTeamsAuthorization middleware is enabled.void
setAuthTestCacheExpirationMillis(long authTestCacheExpirationMillis)
Returns the millisecond value to keep cached auth.test response in cache.void
setClassicAppPermissionsEnabled(boolean classicAppPermissionsEnabled)
void
setClientId(String clientId)
void
setClientSecret(String clientSecret)
void
setExecutorServiceProvider(ExecutorServiceProvider executorServiceProvider)
void
setIgnoringSelfEventsEnabled(boolean ignoringSelfEventsEnabled)
void
setOAuthCallbackEnabled(boolean enabled)
Deprecated.void
setOauthCallbackPath(String oauthCallbackPath)
Deprecated.void
setOauthCancellationUrl(String oauthCancellationUrl)
void
setOauthCompletionUrl(String oauthCompletionUrl)
void
setOAuthInstallPageRenderer(OAuthInstallPageRenderer oAuthInstallPageRenderer)
Renders the web page content to display to installers.void
setOAuthInstallPageRenderingEnabled(boolean oAuthInstallPageRenderingEnabled)
If you prefer the behavior in v1.0 - 1.3, set this flag as falsevoid
setOauthInstallPath(String oauthInstallPath)
void
setOAuthInstallPathEnabled(boolean oAuthInstallPathEnabled)
void
setOAuthRedirectUriPageRenderer(OAuthRedirectUriPageRenderer oAuthRedirectUriPageRenderer)
Renders the web page content to display to installers.void
setOauthRedirectUriPath(String oauthRedirectUriPath)
void
setOAuthRedirectUriPathEnabled(boolean oAuthRedirectUriPathEnabled)
void
setOAuthStartEnabled(boolean enabled)
Deprecated.void
setOauthStartPath(String oauthStartPath)
Deprecated.void
setOpenIDConnectEnabled(boolean openIDConnectEnabled)
void
setRedirectUri(String redirectUri)
void
setRequestVerificationEnabled(boolean requestVerificationEnabled)
void
setScope(String scope)
void
setSigningSecret(String signingSecret)
void
setSingleTeamBotToken(String singleTeamBotToken)
void
setSlack(Slack slack)
void
setSslCheckEnabled(boolean sslCheckEnabled)
void
setStateValidationEnabled(boolean stateValidationEnabled)
Enables validation of the state parameter in the OAuth flow.void
setSubtypedMessageEventsAutoAckEnabled(boolean subtypedMessageEventsAutoAckEnabled)
Automatically acknowledge message events that have subtype if true.void
setThreadPoolSize(int threadPoolSize)
The thread pool size for the built-in handy executor service.void
setTokenRotationExpirationMillis(long tokenRotationExpirationMillis)
void
setUnmatchedRequestHandler(UnmatchedRequestHandler unmatchedRequestHandler)
Handles unmatched requests (default behavior is simply returning 404 Not Found).void
setUserScope(String userScope)
void
setVerificationToken(String verificationToken)
Deprecated.AppConfig.AppConfigBuilder
toBuilder()
String
toString()
-
-
-
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()
-
getOauthStartPath
@Deprecated public String getOauthStartPath()
Deprecated.
-
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)
-
builder
public static AppConfig.AppConfigBuilder builder()
-
toBuilder
public AppConfig.AppConfigBuilder toBuilder()
-
getSlack
public Slack getSlack()
-
getExecutorServiceProvider
public ExecutorServiceProvider getExecutorServiceProvider()
-
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)
-
-