authorization: start the prune timer in component_init()

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-02-04 19:17:43 -05:00
parent a5eff12131
commit 1072958534
1 changed files with 3 additions and 1 deletions

View File

@ -197,7 +197,6 @@ class Authorization:
eventloop = self.server.get_event_loop()
self.prune_timer = eventloop.register_timer(
self._prune_conn_handler)
self.prune_timer.start(delay=PRUNE_CHECK_TIME)
# Register Authorization Endpoints
self.permitted_paths.add("/server/redirect")
@ -230,6 +229,9 @@ class Authorization:
self.server.register_notification("authorization:user_created")
self.server.register_notification("authorization:user_deleted")
async def component_init(self) -> None:
self.prune_timer.start(delay=PRUNE_CHECK_TIME)
async def _handle_apikey_request(self, web_request: WebRequest) -> str:
action = web_request.get_action()
if action.upper() == 'POST':