(self, context: OIDCCallbackContext)
| 89 | |
| 90 | class _OIDCAWSCallback(OIDCCallback): |
| 91 | def fetch(self, context: OIDCCallbackContext) -> OIDCCallbackResult: |
| 92 | token_file = os.environ.get("AWS_WEB_IDENTITY_TOKEN_FILE") |
| 93 | if not token_file: |
| 94 | raise RuntimeError( |
| 95 | 'MONGODB-OIDC with an "aws" provider requires "AWS_WEB_IDENTITY_TOKEN_FILE" to be set' |
| 96 | ) |
| 97 | with open(token_file) as fid: |
| 98 | return OIDCCallbackResult(access_token=fid.read().strip()) |
| 99 | |
| 100 | |
| 101 | class _OIDCAzureCallback(OIDCCallback): |
nothing calls this directly
no test coverage detected