From 6efb34cc26a1b40866a0e8b4f3e7e9155a2494fd Mon Sep 17 00:00:00 2001 From: Jing Cao Date: Sat, 20 Jan 2024 22:05:28 +0000 Subject: [PATCH] remove old orcid endpoints --- nmdc_runtime/api/endpoints/users.py | 39 ----------------------------- 1 file changed, 39 deletions(-) diff --git a/nmdc_runtime/api/endpoints/users.py b/nmdc_runtime/api/endpoints/users.py index 21c478ad..00aa48c0 100644 --- a/nmdc_runtime/api/endpoints/users.py +++ b/nmdc_runtime/api/endpoints/users.py @@ -72,45 +72,6 @@ async def receive_orcid_code(request: Request, code: str, state: str | None = No return response -@router.get("/orcid_authorize") -async def orcid_authorize(): - """NOTE: You want to load /orcid_authorize directly in your web browser to initiate the login redirect flow.""" - return RedirectResponse( - f"https://orcid.org/oauth/authorize?client_id={ORCID_CLIENT_ID}" - "&response_type=token&scope=openid&" - f"redirect_uri={BASE_URL_EXTERNAL}/orcid_token" - ) - - -@router.get("/orcid_token") -async def redirect_uri_for_orcid_token(req: Request): - """ - Returns a web page that will display a user's orcid jwt token for copy/paste. - - This route is loaded by orcid.org after a successful orcid user login. - """ - return HTMLResponse( - """ - - - - -
- - - """ - ) - - @router.post("/token", response_model=Token) async def login_for_access_token( form_data: OAuth2PasswordOrClientCredentialsRequestForm = Depends(),