denisenkom / pytds

Python DBAPI driver for MSSQL using pure Python TDS (Tabular Data Stream) protocol implementation
MIT License
191 stars 53 forks source link

Prelogin and Login handling for TDS74 FederatedAuth with Security Token #166

Open bowleri opened 3 months ago

bowleri commented 3 months ago

Fixes #135

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 95.37572% with 8 lines in your changes missing coverage. Please review.

Project coverage is 89.19%. Comparing base (585547b) to head (ea3f618).

Files Patch % Lines
src/pytds/tds_session.py 95.18% 4 Missing :warning:
tests/all_test.py 33.33% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #166 +/- ## ========================================== + Coverage 89.10% 89.19% +0.09% ========================================== Files 44 44 Lines 8095 8240 +145 ========================================== + Hits 7213 7350 +137 - Misses 882 890 +8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bowleri commented 3 months ago

Appveyor update of ruff from ruff-0.5.1 to ruff-0.5.3 has created failures in tds_types.py

denisenkom commented 2 months ago

Hi @bowleri, thank you for this pull request. I have some questions below.

How can I test this? Maybe you can give me a simple example script that generates access token and nonce, that I could then use against my test Azure account.

It also seems couple validations are missing, can you add those validations?:

I noticed that you convert access_token into ASCII byte string, this assumes that access_token contains only ASCII characters. Is this assumption safe?