(self, context: OIDCCallbackContext)
| 78 | |
| 79 | class _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 | |
| 90 | class _OIDCAWSCallback(OIDCCallback): |
nothing calls this directly
no test coverage detected