Skip to content
Snippets Groups Projects
Commit 2f1123bc authored by Mart van Santen's avatar Mart van Santen
Browse files

Add debugging

parent f6484131
No related branches found
No related tags found
2 merge requests!68Merge loginpanel into main and release 0.5.0,!66Resolve "allow password change without SSL/public endpoint in startup job"
Pipeline #10375 failed with stages
in 57 seconds
......@@ -205,7 +205,7 @@ hydra:
# Install login panel
login:
image:
<< : &IMAGE_DEFAULTS_SSO { tag: "loginpanel", pullPolicy: "Always" }
<< : &IMAGE_DEFAULTS_SSO { tag: "116-allow-password-change-without-ssl-public-endpoint-in-startup-job", pullPolicy: "Always" }
repository: "open.greenhost.net:4567/stackspin/single-sign-on/login"
podAnnotations: {}
db:
......
......@@ -241,6 +241,7 @@ class KratosUser():
# We override the default Redirect handler with our custom handler to
# be able to catch the cookies.
opener = urllib.request.build_opener(RedirectFilter)
print(f"Opening: {recovery_url}")
opener.open(recovery_url)
# If we do not have a 2xx status, urllib throws an error, as we "stopped"
# at our redirect, we expect a 3xx status
......@@ -249,9 +250,9 @@ class KratosUser():
cookies = req.headers.get_all('Set-Cookie')
url = req.headers.get('Location')
else:
raise BackendError('Unable to fetch recovery link') from req
raise BackendError(f'Unable to fetch recovery link {recovery_url}') from req
else:
raise BackendError('Unable to fetch recovery link')
raise BackendError(f'Unable to fetch recovery link: {recovery_url}')
# Step 2: Extract cookies and data for next step. We expect to have an
# authorized session now. We need the cookies for followup calls
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment