Skip to content

Commit cacff18

Browse files
committed
Remove requirement.txt, added new non-binary requirements.txt file.
1 parent f91f64e commit cacff18

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.vscode/
12
*.pyc
23
.idea/
34
__pycache__/

section11/app.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
db.init_app(app)
1515

1616
"""
17-
JWT related configurations began. The following functions includes:
17+
JWT related configuration. The following functions includes:
1818
1) add claims to each jwt
1919
2) customize the token expired error message
2020
"""
21-
app.config['JWT_SECRET_KEY'] = 'jose' # we can also use app.secret like before, Flask-JWT-Extended can recognize both
21+
app.config['JWT_SECRET_KEY'] = 'jose' # we can also use app.secret like before, Flask-JWT-Extended can recognize both
2222
app.config['JWT_BLACKLIST_ENABLED'] = True # enable blacklist feature
2323
app.config['JWT_BLACKLIST_TOKEN_CHECKS'] = ['access', 'refresh'] # allow blacklisting for access and refresh tokens
2424
jwt = JWTManager(app)
@@ -28,8 +28,6 @@
2828
and for each jwt protected endpoint, we can retrieve these claims via `get_jwt_claims()`
2929
one possible use case for claims are access level control, which is shown below
3030
"""
31-
32-
3331
@jwt.user_claims_loader
3432
def add_claims_to_jwt(identity):
3533
if identity == 1: # instead of hard-coding, we can read from a config file to get a list of admins instead

section11/requirement.txt

-108 Bytes
Binary file not shown.

section11/requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Flask-JWT-Extended
2+
Flask-RESTful
3+
Flask-SQLAlchemy
4+

0 commit comments

Comments
 (0)