Skip to content

Commit 770e4f6

Browse files
committed
always use for source
1 parent 1924f3e commit 770e4f6

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

.evergreen/run-mongodb-oidc-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ shopt -s expand_aliases # needed for `urlencode` alias
2323

2424
MONGODB_URI=${MONGODB_URI:-"mongodb://localhost"}
2525
MONGODB_URI_SINGLE="${MONGODB_URI}/?authMechanism=MONGODB-OIDC"
26-
MONGODB_URI_MULTIPLE="${MONGODB_URI}:27018/?authMechanism=MONGODB-OIDC&directConnection=true"
26+
MONGODB_URI_MULTIPLE="mongodb+srv://cluster0.oztdp.mongodb-dev.net/?authMechanism=MONGODB-OIDC"
2727

2828
if [ -z "${OIDC_TOKEN_DIR}" ]; then
2929
echo "Must specify OIDC_TOKEN_DIR"

pymongo/auth.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,6 @@ def _build_credentials_tuple(mech, source, user, passwd, extra, database):
140140
# user can be None for temporary link-local EC2 credentials.
141141
return MongoCredential(mech, "$external", user, passwd, aws_props, None)
142142
elif mech == "MONGODB-OIDC":
143-
if source is not None and source != "$external":
144-
raise ValueError("authentication source must be $external or None for MONGODB-OIDC")
145143
properties = extra.get("authmechanismproperties", {})
146144
request_token_callback = properties.get("request_token_callback")
147145
refresh_token_callback = properties.get("refresh_token_callback", None)

0 commit comments

Comments
 (0)