"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
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
requestChecker-0.0.1.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for requestChecker-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92baf041ae25477d625323b062b03253709b45df5b885368cd6e3f9a96eda1bb |
|
MD5 | 3048f0e249a35bfbfa6aa45d67991d47 |
|
BLAKE2b-256 | 129fd652a870fd98f33619427922ad82f5f59363d7df95b307e06cd5a7a86031 |