Change KRATOS_URL to KRATOS_ADMIN_URL and HYDRA_URL to HYDRA_PUBLIC_URL for clarity
This commit is contained in:
parent
0074fee909
commit
a7fb3ab28d
4 changed files with 8 additions and 9 deletions
|
|
@ -43,7 +43,7 @@ class HydraOauth:
|
|||
hydra = OAuth2Session(
|
||||
client_id=HYDRA_CLIENT_ID, token=session["hydra_token"]
|
||||
)
|
||||
user_info = hydra.get("{}/userinfo".format(HYDRA_URL))
|
||||
user_info = hydra.get("{}/userinfo".format(HYDRA_PUBLIC_URL))
|
||||
|
||||
return user_info.json()
|
||||
except Exception as err:
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class KratosApi:
|
|||
@staticmethod
|
||||
def get(url):
|
||||
try:
|
||||
res = requests.get("{}{}".format(KRATOS_URL, url))
|
||||
res = requests.get("{}{}".format(KRATOS_ADMIN_URL, url))
|
||||
KratosApi.__handleError(res)
|
||||
return res
|
||||
except KratosError as err:
|
||||
|
|
@ -26,7 +26,7 @@ class KratosApi:
|
|||
@staticmethod
|
||||
def post(url, data):
|
||||
try:
|
||||
res = requests.post("{}{}".format(KRATOS_URL, url), json=data)
|
||||
res = requests.post("{}{}".format(KRATOS_ADMIN_URL, url), json=data)
|
||||
KratosApi.__handleError(res)
|
||||
return res
|
||||
except KratosError as err:
|
||||
|
|
@ -37,7 +37,7 @@ class KratosApi:
|
|||
@staticmethod
|
||||
def put(url, data):
|
||||
try:
|
||||
res = requests.put("{}{}".format(KRATOS_URL, url), json=data)
|
||||
res = requests.put("{}{}".format(KRATOS_ADMIN_URL, url), json=data)
|
||||
KratosApi.__handleError(res)
|
||||
return res
|
||||
except KratosError as err:
|
||||
|
|
@ -48,7 +48,7 @@ class KratosApi:
|
|||
@staticmethod
|
||||
def delete(url):
|
||||
try:
|
||||
res = requests.delete("{}{}".format(KRATOS_URL, url))
|
||||
res = requests.delete("{}{}".format(KRATOS_ADMIN_URL, url))
|
||||
KratosApi.__handleError(res)
|
||||
return res
|
||||
except KratosError as err:
|
||||
|
|
|
|||
Reference in a new issue