From c0ab3a589fe089ea0e4a5afbaeb7ba5145c60725 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Thu, 29 Dec 2022 20:33:50 +0100 Subject: [PATCH] migrated '/client-token' to '/-/client-token' --- app/main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index a9230f1..f1394b8 100644 --- a/app/main.py +++ b/app/main.py @@ -160,8 +160,8 @@ async def _lease_delete(request: Request, lease_ref: str): # venv/lib/python3.9/site-packages/nls_core_service_instance/service_instance_token_manager.py -@app.get('/client-token', summary='* Client-Token', description='creates a new messenger token for this service instance') -async def client_token(): +@app.get('/-/client-token', summary='* Client-Token', description='creates a new messenger token for this service instance') +async def _client_token(): cur_time = datetime.utcnow() exp_time = cur_time + relativedelta(years=12) @@ -205,6 +205,11 @@ async def client_token(): return response +@app.get('/client-token', summary='* Client-Token', description='creates a new messenger token for this service instance', deprecated=True) +async def client_token(): + return RedirectResponse('/-/client-token') + + # venv/lib/python3.9/site-packages/nls_services_auth/test/test_origins_controller.py # {"candidate_origin_ref":"00112233-4455-6677-8899-aabbccddeeff","environment":{"fingerprint":{"mac_address_list":["ff:ff:ff:ff:ff:ff"]},"hostname":"my-hostname","ip_address_list":["192.168.178.123","fe80::","fe80::1%enp6s18"],"guest_driver_version":"510.85.02","os_platform":"Debian GNU/Linux 11 (bullseye) 11","os_version":"11 (bullseye)"},"registration_pending":false,"update_pending":false} @app.post('/auth/v1/origin', description='find or create an origin')