From 0a89b3f1be6b794f4b77978504106dab6d022c28 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 21 Dec 2023 11:51:03 +0100 Subject: [PATCH] fix url for get userinfo --- orchestra/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/orchestra/views.py b/orchestra/views.py index 79b61e24..02a0076c 100644 --- a/orchestra/views.py +++ b/orchestra/views.py @@ -1,6 +1,7 @@ import json import requests from django.apps import apps +from django.conf import settings from django.http import Http404, JsonResponse from django.contrib.admin.utils import unquote from django.core.exceptions import PermissionDenied @@ -26,7 +27,9 @@ def serve_private_media(request, app_label, model_name, field_name, object_id, f def get_user_info(token): - url = "http://localhost:5000/oauth/userinfo" + # domain = settings.OIDC_PROVIDER.strip("/") + domain = "https://idp.demo.pangea.org" + url = f"{domain}/application/o/userinfo/" access_token = token['access_token'] token_type = token.get('token_type', 'Bearer') headers = {"Authorization": f"{token_type} {access_token}"}