From dc4da6087ffc55c1f91f5c6b235904fdeaa2e165 Mon Sep 17 00:00:00 2001 From: Arksine Date: Sun, 23 May 2021 14:24:45 -0400 Subject: [PATCH] authorization: rename the oneshot request handler Naming the method "_handle_oneshot_request" is less ambiguous than "_handle_token_request". Signed-off-by: Eric Callahan --- moonraker/components/authorization.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moonraker/components/authorization.py b/moonraker/components/authorization.py index 05fb527..bbe7431 100644 --- a/moonraker/components/authorization.py +++ b/moonraker/components/authorization.py @@ -184,7 +184,7 @@ class Authorization: self._handle_apikey_request, protocol=['http']) self.server.register_endpoint( "/access/oneshot_token", ['GET'], - self._handle_token_request, protocol=['http']) + self._handle_oneshot_request, protocol=['http']) self.server.register_notification("authorization:user_created") self.server.register_notification("authorization:user_deleted") @@ -195,7 +195,7 @@ class Authorization: self.users[f'{API_USER}.api_key'] = self.api_key return self.api_key - async def _handle_token_request(self, web_request: WebRequest) -> str: + async def _handle_oneshot_request(self, web_request: WebRequest) -> str: ip = web_request.get_ip_address() assert ip is not None user_info = web_request.get_current_user()