Python Flask adapter for verifying Slack signatures
Project description
The Slack Signature Authentication module is a Python-based solution for Flask applications to be able to authenticate POST requests coming in from Slack. The module returns HTTP code 403 for those requests that fail Slack’s signature validation. The module adds a decorator that can be used for Flask routes.
Installation
pip install flask_slacksigauth
App Setup
After declaring your Flask API endpoints, you can decorate them to for authentication checks:
@app.route('/api', methods=['POST', 'GET'])
@slack_sig_auth
def api():
return jsonify(message='OK'), 200
This will force slack signature authentication for you ‘/api’ endoint.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for flask_slacksigauth-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9d21662bf6845717614dd81a9b85dcb927acdda62c3a411707645aaacde5422 |
|
MD5 | 8c7c853b1c2e6fae516a8c3de1521f83 |
|
BLAKE2b-256 | ac29a29ae936303953f4c00d8b0491807703822969323abe2e01415f6d81b5f0 |