Module slack_bolt.middleware
A middleware processes request data and calls next()
method
if the execution chain should continue running the following middleware.
Middleware can be used globally before all listener executions. It's also possible to run a middleware only for a particular listener.
Expand source code
"""A middleware processes request data and calls `next()` method
if the execution chain should continue running the following middleware.
Middleware can be used globally before all listener executions.
It's also possible to run a middleware only for a particular listener.
"""
# Don't add async module imports here
from .authorization import (
SingleTeamAuthorization,
MultiTeamsAuthorization,
) # noqa: F401
from .custom_middleware import CustomMiddleware # noqa: F401
from .ignoring_self_events import IgnoringSelfEvents # noqa: F401
from .middleware import Middleware # noqa: F401
from .request_verification import RequestVerification # noqa: F401
from .ssl_check import SslCheck # noqa: F401
from .url_verification import UrlVerification # noqa: F401
builtin_middleware_classes = [
SslCheck,
RequestVerification,
SingleTeamAuthorization,
MultiTeamsAuthorization,
IgnoringSelfEvents,
UrlVerification,
]
for cls in builtin_middleware_classes:
Middleware.register(cls)
Sub-modules
slack_bolt.middleware.async_builtins
slack_bolt.middleware.async_custom_middleware
slack_bolt.middleware.async_middleware
slack_bolt.middleware.async_middleware_error_handler
slack_bolt.middleware.authorization
slack_bolt.middleware.custom_middleware
slack_bolt.middleware.ignoring_self_events
slack_bolt.middleware.message_listener_matches
slack_bolt.middleware.middleware
slack_bolt.middleware.middleware_error_handler
slack_bolt.middleware.request_verification
slack_bolt.middleware.ssl_check
slack_bolt.middleware.url_verification