Skip to content

Commit

Permalink
disvoery url
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Nov 23, 2024
1 parent 8a38902 commit efafaf2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cashu/mint/auth/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class AuthLedger(Ledger):
jwks_url: str
jwks_client: jwt.PyJWKClient
signing_key: jwt.PyJWK
oicd_discovery_url: str

def __init__(
self,
Expand All @@ -39,12 +40,11 @@ def __init__(
crud=crud,
amounts=amounts,
)

if not settings.mint_auth_oicd_discovery_url:
raise Exception("Missing OpenID Connect discovery URL.")
self.oicd_discovery_url = settings.mint_auth_oicd_discovery_url
self.oicd_discovery_url = settings.mint_auth_oicd_discovery_url or ""

async def init_auth(self):
if not self.oicd_discovery_url:
raise Exception("Missing OpenID Connect discovery URL.")
logger.info(f"Initializing OpenID Connect: {self.oicd_discovery_url}")
self.oicd_discovery_json = self._get_oicd_discovery_json()
self.jwks_url = self.oicd_discovery_json["jwks_uri"]
Expand Down

0 comments on commit efafaf2

Please sign in to comment.