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 Response
buildError
(int statusCode, AuthTestResponse authTestResponse, IOException ioException, SlackApiException slackException) protected AuthTestResponse
callAuthTest
(String token, AppConfig config, MethodsClient client) protected void
finalize()
protected Response
handleAuthTestError
(String errorCode, Bot foundBot, Installer foundInstaller, AuthTestResponse authTestResponse) boolean
void
setAlwaysRequestUserTokenNeeded
(boolean alwaysRequestUserTokenNeeded)
-
Constructor Details
-
MultiTeamsAuthorization
-
-
Method Details
-
isAlwaysRequestUserTokenNeeded
public boolean isAlwaysRequestUserTokenNeeded() -
setAlwaysRequestUserTokenNeeded
public void setAlwaysRequestUserTokenNeeded(boolean alwaysRequestUserTokenNeeded) -
finalize
-
apply
- Specified by:
apply
in interfaceMiddleware
- Throws:
Exception
-
callAuthTest
protected AuthTestResponse callAuthTest(String token, AppConfig config, MethodsClient client) throws IOException, SlackApiException - Throws:
IOException
SlackApiException
-
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)
-