feat: add helper scripts for infrastructure management and troubleshooting
This commit is contained in:
19
scripts/test_authentik_oidc_cfg.py
Normal file
19
scripts/test_authentik_oidc_cfg.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import urllib.request
|
||||
import ssl
|
||||
import json
|
||||
|
||||
ctx = ssl.create_default_context()
|
||||
ctx.check_hostname = False
|
||||
ctx.verify_mode = ssl.CERT_NONE
|
||||
|
||||
url = "https://authentik.snarfnet.net/application/o/semaphore/.well-known/openid-configuration"
|
||||
try:
|
||||
resp = urllib.request.urlopen(urllib.request.Request(url), context=ctx)
|
||||
data = json.loads(resp.read().decode())
|
||||
print("Issuer:", data.get('issuer'))
|
||||
print("Auth endpoint:", data.get('authorization_endpoint'))
|
||||
print("Token endpoint:", data.get('token_endpoint'))
|
||||
print("Userinfo endpoint:", data.get('userinfo_endpoint'))
|
||||
except Exception as e:
|
||||
print("Error:", e)
|
||||
|
||||
Reference in New Issue
Block a user