From 135fed72b3bbcc4b165c3b60af0dd4eba687aed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Veljko=20Tekelerovi=C4=87?= Date: Mon, 2 Mar 2020 22:54:31 +0100 Subject: [PATCH] Added requirements.txt --- auth-module.py | 5 +++-- requirements.txt | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 requirements.txt diff --git a/auth-module.py b/auth-module.py index f3c8d5a..2f4df3f 100644 --- a/auth-module.py +++ b/auth-module.py @@ -1,6 +1,6 @@ -from flask import Flask, jsonify, request, make_response import jwt import datetime +from flask import Flask, jsonify, request, make_response from functools import wraps # initialize main Flask object @@ -10,6 +10,7 @@ # used as part of your authentication strategy app.config['SECRET_KEY'] = 'some_secret_key' +# protector function wraping other functions def token_access_required(f): @wraps(f) def decorated(*args, **kwargs): @@ -35,7 +36,7 @@ def protected(): @app.route('/public') def unprotected(): - return jsonify({'message': 'Anyone can view this!'}) + return jsonify({'message': 'This is public domain'}) @app.route('/login') def login(): diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..c250825 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +Flask==1.1.1 +PyJWT==1.7.1