mirror of
https://github.com/hubHarmony/servii-backend.git
synced 2024-11-17 21:40:31 +00:00
[V2+] Secrets added.
(For local testing purposes.) [+] Fixed SSL/TLS issues. Signed-off-by: Charles Le Maux <charles.le-maux@epitech.eu>
This commit is contained in:
parent
6cda6461cc
commit
ef6bc53269
7
app.py
7
app.py
@ -39,11 +39,16 @@ def generic_response_maker(status_code: http.HTTPStatus, _message: str = None) -
|
||||
return message, status_code.value
|
||||
|
||||
|
||||
'''
|
||||
valid, user_id = firebase_manager.verify_jwt_token(data['token'])
|
||||
TODO : replace 52 by the given statement.
|
||||
'''
|
||||
|
||||
|
||||
def authenticate_request(data: dict):
|
||||
if 'token' not in data:
|
||||
raise Exception("Missing 'token' in request body. The API doesn't support anonymous access anymore.")
|
||||
else:
|
||||
#valid, user_id = firebase_manager.verify_jwt_token(data['token']) //TODO : REMOVE THIS when the front is ready
|
||||
valid, user_id = True, data['token']
|
||||
if not valid:
|
||||
raise Exception("Invalid JWT token.")
|
||||
|
Loading…
Reference in New Issue
Block a user