mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
test:permissions: update sso url and credentials structure
This commit is contained in:
parent
2459834c1c
commit
213d6416b6
1 changed files with 2 additions and 2 deletions
|
@ -355,7 +355,7 @@ def check_permission_for_apps():
|
||||||
|
|
||||||
def can_access_webpage(webpath, logged_as=None):
|
def can_access_webpage(webpath, logged_as=None):
|
||||||
webpath = webpath.rstrip("/")
|
webpath = webpath.rstrip("/")
|
||||||
sso_url = "https://" + maindomain + "/yunohost/sso/"
|
sso_url = "https://" + maindomain + "/yunohost/portalapi/login"
|
||||||
|
|
||||||
# Anonymous access
|
# Anonymous access
|
||||||
if not logged_as:
|
if not logged_as:
|
||||||
|
@ -365,7 +365,7 @@ def can_access_webpage(webpath, logged_as=None):
|
||||||
with requests.Session() as session:
|
with requests.Session() as session:
|
||||||
session.post(
|
session.post(
|
||||||
sso_url,
|
sso_url,
|
||||||
data={"user": logged_as, "password": dummy_password},
|
data={"credentials": f"{logged_as}:{dummy_password}"},
|
||||||
headers={
|
headers={
|
||||||
"Referer": sso_url,
|
"Referer": sso_url,
|
||||||
"Content-Type": "application/x-www-form-urlencoded",
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
|
Loading…
Add table
Reference in a new issue