MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _OIDCTestCallback

Class _OIDCTestCallback

pymongo/auth_oidc_shared.py:79–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77
78
79class _OIDCTestCallback(OIDCCallback):
80 def fetch(self, context: OIDCCallbackContext) -> OIDCCallbackResult:
81 token_file = os.environ.get("OIDC_TOKEN_FILE")
82 if not token_file:
83 raise RuntimeError(
84 'MONGODB-OIDC with an "test" provider requires "OIDC_TOKEN_FILE" to be set'
85 )
86 with open(token_file) as fid:
87 return OIDCCallbackResult(access_token=fid.read().strip())
88
89
90class _OIDCAWSCallback(OIDCCallback):

Callers 1

_build_credentials_tupleFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected