Skip to main content

"Flask module allowing to configure and centralize the authorizations on the routes"

Project description

Flask module allowing to configure and centralize the authorizations on the routes.

Exemple

from flask import Flask
from flask_restful import Api, Resource
from RequestChecker import RequestChecker, Path, SecurityPolicyEnum, MethodsEnum

app = Flask("test")
api = Api(app)

requestChecker = RequestChecker(api)

def LoginResource(Resource):
    def post(self):
        pass

def TestResource(Resource):
    def get(self):
        pass

    def post(self):
        pass

pathLogin = Path('/login', policy=SecurityPolicyEnum.ANNONYMOUS, methods=[MethodsEnum.POST])
pathTest = Path('/test', policy=SecurityPolicyEnum.JWT, methods=[MethodsEnum.GET, MethodsEnum.POST])

requestChecker.addPath(pathTest, TestResource)
requestChecker.addPath(pathLogin, LoginResource)

Dependencies

Flask flask_jwt_extended werkzeug Flask-Restful

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

requestChecker-0.0.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

requestChecker-0.0.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file requestChecker-0.0.1.tar.gz.

File metadata

  • Download URL: requestChecker-0.0.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.9

File hashes

Hashes for requestChecker-0.0.1.tar.gz
Algorithm Hash digest
SHA256 85ce409c0b7ed3af35714b04b46e292eae9023912ad5f87e2183216f64222ef5
MD5 cd01159d772f5f9194348fb1a356c92e
BLAKE2b-256 1728a7cf1d6c1a232b641463fa4278392ceced40a8cdd233243d88651df583af

See more details on using hashes here.

File details

Details for the file requestChecker-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: requestChecker-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.9

File hashes

Hashes for requestChecker-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 92baf041ae25477d625323b062b03253709b45df5b885368cd6e3f9a96eda1bb
MD5 3048f0e249a35bfbfa6aa45d67991d47
BLAKE2b-256 129fd652a870fd98f33619427922ad82f5f59363d7df95b307e06cd5a7a86031

See more details on using hashes here.

Supported by

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