-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connect to a DB by directly supplying access token #26
Conversation
I think this scenario was supposed to be covered by the non-AAD-aware token provider interface here: Line 44 in f21bac1
No need to bring in any azuread dependencies, just provide a function that provides the token |
@shueybubbles yes, but how will a client of this library use it? This PR allows one to easily supply the token as a part of the connection string when connecting to the DB. Internally, you will notice that I am using the same Refer to the connection string in the example file: That's it, one will now only need to supply the access token as the password. |
@shueybubbles For the access token to work, it needs to pass through the fedauth login workflow. Refer: Line 998 in f21bac1
|
836fc90
to
1818e42
Compare
Codecov Report
@@ Coverage Diff @@
## main #26 +/- ##
=======================================
Coverage ? 71.19%
=======================================
Files ? 24
Lines ? 5427
Branches ? 0
=======================================
Hits ? 3864
Misses ? 1319
Partials ? 244 Continue to review full report at Codecov.
|
1818e42
to
91766b9
Compare
Refer to the example file (examples/azuread-service-principal-authtoken/service_principal_authtoken.go) to understand how it will work.
EOL CRLF difference is causing all the lines to be shown as changed, not sure if GitHub offers an option to ignore this while reviewing, suggestions are welcome.
Fixes #24.