20 lines
634 B
Python
20 lines
634 B
Python
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)
|
|
|