diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-21 13:05:37 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-21 13:05:37 +0300 |
| commit | 5c58e6499306b3087015758c1054497dccc407e6 (patch) | |
| tree | 82d3b43c83f57d381d7a4fd4d7071861387fb68f /Software/Visual_Studio/Tango.Core/DataSource.cs | |
| parent | b4a1c833f0e67835e89961e77329efe5bf2a7797 (diff) | |
| download | Tango-5c58e6499306b3087015758c1054497dccc407e6.tar.gz Tango-5c58e6499306b3087015758c1054497dccc407e6.zip | |
Done with Developer Module.
Implemented DB auth using Azure Active Directory Interactive!
Diffstat (limited to 'Software/Visual_Studio/Tango.Core/DataSource.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Core/DataSource.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.Core/DataSource.cs b/Software/Visual_Studio/Tango.Core/DataSource.cs index fb46faa2e..83b49bbc6 100644 --- a/Software/Visual_Studio/Tango.Core/DataSource.cs +++ b/Software/Visual_Studio/Tango.Core/DataSource.cs @@ -15,6 +15,8 @@ namespace Tango.Core /// </summary> public class DataSource { + private static bool _has_provider; + /// <summary> /// Gets or sets the type of source. /// </summary> @@ -100,7 +102,13 @@ namespace Tango.Core if (IntegratedSecurity) { - //var provider = new Microsoft.IdentityModel.Clients(); + + if (!_has_provider) + { + var provider = new ActiveDirectoryAuthProvider(); + SqlAuthenticationProvider.SetProvider(SqlAuthenticationMethod.ActiveDirectoryInteractive, provider); + _has_provider = true; + } SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(); |
