bujjibabukatta commented on code in PR #69564: URL: https://github.com/apache/airflow/pull/69564#discussion_r3553360143
########## providers/microsoft/azure/src/airflow/providers/microsoft/azure/fs/msgraph.py: ########## @@ -27,6 +27,55 @@ schemes = ["msgraph", "sharepoint", "onedrive", "msgd"] +#: Default scope requested when fetching a certificate-based access token. +#: Matches ``KiotaRequestAdapterHook.DEFAULT_SCOPE``. +DEFAULT_SCOPE = "https://graph.microsoft.com/.default" + + +def _get_certificate_token( Review Comment: Good catch, thanks! Pulled the cert-building logic into a shared `build_certificate_credential()` factory in `hooks/msgraph.py` — both `get_credentials` and `fs/msgraph.py`'s `_get_certificate_token` call it now, just passing in the sync vs async `CertificateCredential` class. No more duplicated construction logic. Ran ruff/mypy on both files locally and re-verified the fs module delegates correctly. Existing tests didn't need changes since they mock at the `_get_certificate_token()` boundary. Pushed! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
