Class MultiTeamsAuthorization
java.lang.Object
com.slack.api.bolt.middleware.builtin.MultiTeamsAuthorization
- All Implemented Interfaces:
Middleware
Verifies if valid installations exist for requests.
-
Constructor Summary
ConstructorsConstructorDescriptionMultiTeamsAuthorization(AppConfig config, InstallationService installationService) -
Method Summary
Modifier and TypeMethodDescriptionapply(Request req, Response resp, MiddlewareChain chain) protected ResponsebuildError(int statusCode, AuthTestResponse authTestResponse, IOException ioException, SlackApiException slackException) protected AuthTestResponsecallAuthTest(String token, AppConfig config, MethodsClient client) protected voidfinalize()protected ResponsehandleAuthTestError(String errorCode, Bot foundBot, Installer foundInstaller, AuthTestResponse authTestResponse) booleanvoidsetAlwaysRequestUserTokenNeeded(boolean alwaysRequestUserTokenNeeded)
-
Constructor Details
-
MultiTeamsAuthorization
-
-
Method Details
-
isAlwaysRequestUserTokenNeeded
public boolean isAlwaysRequestUserTokenNeeded() -
setAlwaysRequestUserTokenNeeded
public void setAlwaysRequestUserTokenNeeded(boolean alwaysRequestUserTokenNeeded) -
finalize
-
apply
- Specified by:
applyin interfaceMiddleware- Throws:
Exception
-
callAuthTest
protected AuthTestResponse callAuthTest(String token, AppConfig config, MethodsClient client) throws IOException, SlackApiException - Throws:
IOExceptionSlackApiException
-
handleAuthTestError
protected Response handleAuthTestError(String errorCode, Bot foundBot, Installer foundInstaller, AuthTestResponse authTestResponse) throws Exception - Throws:
Exception
-
buildError
protected Response buildError(int statusCode, AuthTestResponse authTestResponse, IOException ioException, SlackApiException slackException)
-