11from wandelbots .omni .datatypes import Auth0Credentials
2- from wandelbots .omni .utils .auth import get_auth_token , store_auth_token , validate_request
2+ from wandelbots .omni .utils .auth import (
3+ get_auth_token ,
4+ store_auth_token ,
5+ validate_request ,
6+ )
37from wandelbots .omni .utils .base import get_versions_of_enabled_extensions
4- from fastapi import Body , FastAPI , Request
8+ from fastapi import Body , FastAPI , Request , HTTPException
59from fastapi import status as st
610from fastapi .middleware .cors import CORSMiddleware
711from fastapi .responses import HTMLResponse
2226omniservice_app = FastAPI (
2327 title = "Wandelbots Omniservice" ,
2428 description = "A microservice-based framework for managing Omniverse functionalities" ,
25- version = "1.47.3 " ,
29+ version = "1.47.4 " ,
2630 redoc_url = None ,
2731)
2832omniservice_app .add_middleware (
3438)
3539
3640
37-
3841@omniservice_app .get ("/status" , status_code = st .HTTP_200_OK )
3942async def status ():
4043 """
@@ -70,7 +73,7 @@ async def authenticate(credentials: Auth0Credentials = Body()) -> None:
7073 """
7174 try :
7275 protocol = "https" if credentials .is_secured else "http"
73- base_url = f"{ protocol } ://{ credentials .host } /"
76+ base_url = f"{ protocol } ://{ credentials .host } /api/v1/license "
7477
7578 if credentials .access_token :
7679 token_to_validate = credentials .access_token
@@ -82,7 +85,7 @@ async def authenticate(credentials: Auth0Credentials = Body()) -> None:
8285 if token_to_validate is not None :
8386 store_auth_token (token_to_validate )
8487 except Exception as e :
85- raise ValueError ( f"Can not authenticate with Wandelbots NOVA. { e } " )
88+ raise HTTPException ( 500 , f"Can not authenticate with Wandelbots NOVA. { e } " )
8689
8790
8891@omniservice_app .get ("/api" , include_in_schema = False )
@@ -126,5 +129,3 @@ async def root():
126129omniservice_app .include_router (router = stream_router )
127130omniservice_app .include_router (router = ghost_teaching_router )
128131omniservice_app .include_router (router = ui_router )
129-
130-
0 commit comments