Skip to main content

Python Flask adapter for verifying Slack signatures

Project description

https://travis-ci.org/eaescob/flask-slacksigauth.svg?branch=master https://codecov.io/gh/eaescob/flask-slacksigauth/branch/master/graph/badge.svg https://badge.fury.io/py/flask-slacksigauth.svg

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask_slacksigauth-1.0.9.tar.gz (15.5 kB view hashes)

Uploaded Source

Built Distribution

flask_slacksigauth-1.0.9-py3-none-any.whl (15.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page