Skip to content

Commit ff573ef

Browse files
committed
debug
1 parent 3791012 commit ff573ef

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pymongo/synchronous/auth_oidc.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ class _OIDCAuthenticator:
8787
def reauthenticate(self, conn: Connection) -> Optional[Mapping[str, Any]]:
8888
"""Handle a reauthenticate from the server."""
8989
# Invalidate the token for the connection.
90+
print("reauthenticating")
9091
self._invalidate(conn)
9192
# Call the appropriate auth logic for the callback type.
9293
if self.properties.callback:
@@ -99,10 +100,15 @@ def authenticate(self, conn: Connection) -> Optional[Mapping[str, Any]]:
99100
# If it succeeded, we are done.
100101
ctx = conn.auth_ctx
101102
if ctx and ctx.speculate_succeeded():
103+
print("spec auth succeeded")
102104
resp = ctx.speculative_authenticate
103105
if resp and resp["done"]:
104106
conn.oidc_token_gen_id = self.token_gen_id
105107
return resp
108+
elif ctx:
109+
print("spec auth failed")
110+
else:
111+
print("no spec auth")
106112

107113
# If spec auth failed, call the appropriate auth logic for the callback type.
108114
# We cannot assume that the token is invalid, because a proxy may have been

0 commit comments

Comments
 (0)