mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 14:14:22 +01:00
Adds user_id to ExtendedAppointment after authentication
The ExtendedAppointment is passed to the Watcher without user_id, since the user is not yet authenticated. The Watcher has to add the user_id to the ExtendedAppointment after the user is authenticated.
This commit is contained in:
@@ -124,6 +124,8 @@ class Watcher:
|
|||||||
raise AppointmentLimitReached(message)
|
raise AppointmentLimitReached(message)
|
||||||
|
|
||||||
user_id = self.gatekeeper.authenticate_user(appointment.serialize(), signature)
|
user_id = self.gatekeeper.authenticate_user(appointment.serialize(), signature)
|
||||||
|
# The user_id needs to be added to the ExtendedAppointment once the former has been authenticated
|
||||||
|
appointment.user_id = user_id
|
||||||
|
|
||||||
# The uuids are generated as the RIPMED160(locator||user_pubkey).
|
# The uuids are generated as the RIPMED160(locator||user_pubkey).
|
||||||
# If an appointment is requested by the user the uuid can be recomputed and queried straightaway (no maps).
|
# If an appointment is requested by the user the uuid can be recomputed and queried straightaway (no maps).
|
||||||
|
|||||||
Reference in New Issue
Block a user