authorization: rename the oneshot request handler

Naming the method "_handle_oneshot_request" is less ambiguous than "_handle_token_request".

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2021-05-23 14:24:45 -04:00
parent 8a3b885eca
commit dc4da6087f
1 changed files with 2 additions and 2 deletions

View File

@ -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()