@@ -698,8 +698,8 @@ public override string ServerVersion
698698 {
699699 get
700700 {
701- return ( string . Format ( "{0:00}.{1:00}.{2:0000}" , _loginAck . MajorVersion ,
702- ( short ) _loginAck . MinorVersion , _loginAck . BuildNum ) ) ;
701+ return ( string . Format ( "{0:00}.{1:00}.{2:0000}" , _loginAck . majorVersion ,
702+ ( short ) _loginAck . minorVersion , _loginAck . buildNum ) ) ;
703703 }
704704 }
705705
@@ -722,7 +722,7 @@ protected override bool UnbindOnTransactionCompletion
722722 /// <summary>
723723 /// Validates if federated authentication is used, Access Token used by this connection is active for the value of 'accessTokenExpirationBufferTime'.
724724 /// </summary>
725- internal override bool IsAccessTokenExpired => _federatedAuthenticationInfoRequested && DateTime . FromFileTimeUtc ( _fedAuthToken . ExpirationFileTime ) < DateTime . UtcNow . AddSeconds ( accessTokenExpirationBufferTime ) ;
725+ internal override bool IsAccessTokenExpired => _federatedAuthenticationInfoRequested && DateTime . FromFileTimeUtc ( _fedAuthToken . expirationFileTime ) < DateTime . UtcNow . AddSeconds ( accessTokenExpirationBufferTime ) ;
726726
727727 ////////////////////////////////////////////////////////////////////////////////////////
728728 // GENERAL METHODS
@@ -1278,37 +1278,37 @@ private void Login(ServerInfo server, TimeoutTimer timeout, string newPassword,
12781278 }
12791279 }
12801280
1281- login . Authentication = ConnectionOptions . Authentication ;
1282- login . Timeout = timeoutInSeconds ;
1283- login . UserInstance = ConnectionOptions . UserInstance ;
1284- login . HostName = ConnectionOptions . ObtainWorkstationId ( ) ;
1285- login . UserName = ConnectionOptions . UserID ;
1286- login . Password = ConnectionOptions . Password ;
1287- login . ApplicationName = ConnectionOptions . ApplicationName ;
1281+ login . authentication = ConnectionOptions . Authentication ;
1282+ login . timeout = timeoutInSeconds ;
1283+ login . userInstance = ConnectionOptions . UserInstance ;
1284+ login . hostName = ConnectionOptions . ObtainWorkstationId ( ) ;
1285+ login . userName = ConnectionOptions . UserID ;
1286+ login . password = ConnectionOptions . Password ;
1287+ login . applicationName = ConnectionOptions . ApplicationName ;
12881288
1289- login . Language = _currentLanguage ;
1290- if ( ! login . UserInstance )
1289+ login . language = _currentLanguage ;
1290+ if ( ! login . userInstance )
12911291 {
12921292 // Do not send attachdbfilename or database to SSE primary instance
1293- login . Database = CurrentDatabase ;
1294- login . AttachDbFilename = ConnectionOptions . AttachDBFilename ;
1293+ login . database = CurrentDatabase ;
1294+ login . attachDBFilename = ConnectionOptions . AttachDBFilename ;
12951295 }
12961296
12971297 // VSTS#795621 - Ensure ServerName is Sent During TdsLogin To Enable Sql Azure Connectivity.
12981298 // Using server.UserServerName (versus ConnectionOptions.DataSource) since TdsLogin requires
12991299 // serverName to always be non-null.
1300- login . ServerName = server . UserServerName ;
1300+ login . serverName = server . UserServerName ;
13011301
1302- login . UseReplication = ConnectionOptions . Replication ;
1303- login . UseSspi = ConnectionOptions . IntegratedSecurity // Treat AD Integrated like Windows integrated when against a non-FedAuth endpoint
1302+ login . useReplication = ConnectionOptions . Replication ;
1303+ login . useSSPI = ConnectionOptions . IntegratedSecurity // Treat AD Integrated like Windows integrated when against a non-FedAuth endpoint
13041304 || ( ConnectionOptions . Authentication == SqlAuthenticationMethod . ActiveDirectoryIntegrated && ! _fedAuthRequired ) ;
1305- login . PacketSize = _currentPacketSize ;
1306- login . NewPassword = newPassword ;
1307- login . ReadOnlyIntent = ConnectionOptions . ApplicationIntent == ApplicationIntent . ReadOnly ;
1308- login . Credential = _credential ;
1305+ login . packetSize = _currentPacketSize ;
1306+ login . newPassword = newPassword ;
1307+ login . readOnlyIntent = ConnectionOptions . ApplicationIntent == ApplicationIntent . ReadOnly ;
1308+ login . credential = _credential ;
13091309 if ( newSecurePassword != null )
13101310 {
1311- login . NewSecurePassword = newSecurePassword ;
1311+ login . newSecurePassword = newSecurePassword ;
13121312 }
13131313
13141314 TdsEnums . FeatureExtension requestedFeatures = TdsEnums . FeatureExtension . None ;
@@ -1338,9 +1338,9 @@ private void Login(ServerInfo server, TimeoutTimer timeout, string newPassword,
13381338 _fedAuthFeatureExtensionData =
13391339 new FederatedAuthenticationFeatureExtensionData
13401340 {
1341- LibraryType = TdsEnums . FedAuthLibrary . MSAL ,
1342- Authentication = ConnectionOptions . Authentication ,
1343- FedAuthRequiredPreLoginResponse = _fedAuthRequired
1341+ libraryType = TdsEnums . FedAuthLibrary . MSAL ,
1342+ authentication = ConnectionOptions . Authentication ,
1343+ fedAuthRequiredPreLoginResponse = _fedAuthRequired
13441344 } ;
13451345 }
13461346
@@ -1349,9 +1349,9 @@ private void Login(ServerInfo server, TimeoutTimer timeout, string newPassword,
13491349 requestedFeatures |= TdsEnums . FeatureExtension . FedAuth ;
13501350 _fedAuthFeatureExtensionData = new FederatedAuthenticationFeatureExtensionData
13511351 {
1352- LibraryType = TdsEnums . FedAuthLibrary . SecurityToken ,
1353- FedAuthRequiredPreLoginResponse = _fedAuthRequired ,
1354- AccessToken = _accessTokenInBytes
1352+ libraryType = TdsEnums . FedAuthLibrary . SecurityToken ,
1353+ fedAuthRequiredPreLoginResponse = _fedAuthRequired ,
1354+ accessToken = _accessTokenInBytes
13551355 } ;
13561356 // No need any further info from the server for token based authentication. So set _federatedAuthenticationRequested to true
13571357 _federatedAuthenticationRequested = true ;
@@ -2134,14 +2134,14 @@ internal void OnLoginAck(SqlLoginAck rec)
21342134 _loginAck = rec ;
21352135 if ( _recoverySessionData != null )
21362136 {
2137- if ( _recoverySessionData . _tdsVersion != rec . TdsVersion )
2137+ if ( _recoverySessionData . _tdsVersion != rec . tdsVersion )
21382138 {
21392139 throw SQL . CR_TDSVersionNotPreserved ( this ) ;
21402140 }
21412141 }
21422142 if ( _currentSessionData != null )
21432143 {
2144- _currentSessionData . _tdsVersion = rec . TdsVersion ;
2144+ _currentSessionData . _tdsVersion = rec . tdsVersion ;
21452145 }
21462146 }
21472147
@@ -2179,7 +2179,7 @@ internal void OnFedAuthInfo(SqlFedAuthInfo fedAuthInfo)
21792179 Debug . Assert ( _dbConnectionPool . AuthenticationContexts != null ) ;
21802180
21812181 // Construct the dbAuthenticationContextKey with information from FedAuthInfo and store for later use, when inserting in to the token cache.
2182- _dbConnectionPoolAuthenticationContextKey = new DbConnectionPoolAuthenticationContextKey ( fedAuthInfo . StsUrl , fedAuthInfo . Spn ) ;
2182+ _dbConnectionPoolAuthenticationContextKey = new DbConnectionPoolAuthenticationContextKey ( fedAuthInfo . stsurl , fedAuthInfo . spn ) ;
21832183
21842184 // Try to retrieve the authentication context from the pool, if one does exist for this key.
21852185 if ( _dbConnectionPool . AuthenticationContexts . TryGetValue ( _dbConnectionPoolAuthenticationContextKey , out dbConnectionPoolAuthenticationContext ) )
@@ -2272,11 +2272,11 @@ internal void OnFedAuthInfo(SqlFedAuthInfo fedAuthInfo)
22722272
22732273 // If the code flow is here, then we are re-using the context from the cache for this connection attempt and not
22742274 // generating a new access token on this thread.
2275- _fedAuthToken . AccessToken = dbConnectionPoolAuthenticationContext . AccessToken ;
2276- _fedAuthToken . ExpirationFileTime = dbConnectionPoolAuthenticationContext . ExpirationTime . ToFileTime ( ) ;
2275+ _fedAuthToken . accessToken = dbConnectionPoolAuthenticationContext . AccessToken ;
2276+ _fedAuthToken . expirationFileTime = dbConnectionPoolAuthenticationContext . ExpirationTime . ToFileTime ( ) ;
22772277 }
22782278
2279- Debug . Assert ( _fedAuthToken != null && _fedAuthToken . AccessToken != null , "fedAuthToken and fedAuthToken.accessToken cannot be null." ) ;
2279+ Debug . Assert ( _fedAuthToken != null && _fedAuthToken . accessToken != null , "fedAuthToken and fedAuthToken.accessToken cannot be null." ) ;
22802280 _parser . SendFedAuthToken ( _fedAuthToken ) ;
22812281 }
22822282
@@ -2374,8 +2374,8 @@ internal SqlFedAuthToken GetFedAuthToken(SqlFedAuthInfo fedAuthInfo)
23742374 {
23752375 var authParamsBuilder = new SqlAuthenticationParameters . Builder (
23762376 authenticationMethod : ConnectionOptions . Authentication ,
2377- resource : fedAuthInfo . Spn ,
2378- authority : fedAuthInfo . StsUrl ,
2377+ resource : fedAuthInfo . spn ,
2378+ authority : fedAuthInfo . stsurl ,
23792379 serverName : ConnectionOptions . DataSource ,
23802380 databaseName : ConnectionOptions . InitialCatalog )
23812381 . WithConnectionId ( _clientConnectionId )
@@ -2482,7 +2482,7 @@ internal SqlFedAuthToken GetFedAuthToken(SqlFedAuthInfo fedAuthInfo)
24822482 break ;
24832483 }
24842484
2485- Debug . Assert ( _fedAuthToken . AccessToken != null , "AccessToken should not be null." ) ;
2485+ Debug . Assert ( _fedAuthToken . accessToken != null , "AccessToken should not be null." ) ;
24862486#if DEBUG
24872487 if ( _forceMsalRetry )
24882488 {
@@ -2569,13 +2569,13 @@ internal SqlFedAuthToken GetFedAuthToken(SqlFedAuthInfo fedAuthInfo)
25692569 }
25702570
25712571 Debug . Assert ( _fedAuthToken != null , "fedAuthToken should not be null." ) ;
2572- Debug . Assert ( _fedAuthToken . AccessToken != null && _fedAuthToken . AccessToken . Length > 0 , "fedAuthToken.accessToken should not be null or empty." ) ;
2572+ Debug . Assert ( _fedAuthToken . accessToken != null && _fedAuthToken . accessToken . Length > 0 , "fedAuthToken.accessToken should not be null or empty." ) ;
25732573
25742574 // Store the newly generated token in _newDbConnectionPoolAuthenticationContext, only if using pooling.
25752575 if ( _dbConnectionPool != null )
25762576 {
2577- DateTime expirationTime = DateTime . FromFileTimeUtc ( _fedAuthToken . ExpirationFileTime ) ;
2578- _newDbConnectionPoolAuthenticationContext = new DbConnectionPoolAuthenticationContext ( _fedAuthToken . AccessToken , expirationTime ) ;
2577+ DateTime expirationTime = DateTime . FromFileTimeUtc ( _fedAuthToken . expirationFileTime ) ;
2578+ _newDbConnectionPoolAuthenticationContext = new DbConnectionPoolAuthenticationContext ( _fedAuthToken . accessToken , expirationTime ) ;
25792579 }
25802580 SqlClientEventSource . Log . TryTraceEvent ( "<sc.SqlInternalConnectionTds.GetFedAuthToken> {0}, Finished generating federated authentication token." , ObjectID ) ;
25812581 return _fedAuthToken ;
@@ -2667,7 +2667,7 @@ internal void OnFeatureExtAck(int featureId, byte[] data)
26672667
26682668 Debug . Assert ( _fedAuthFeatureExtensionData != null , "_fedAuthFeatureExtensionData must not be null when _federatedAuthenticationRequested == true" ) ;
26692669
2670- switch ( _fedAuthFeatureExtensionData . LibraryType )
2670+ switch ( _fedAuthFeatureExtensionData . libraryType )
26712671 {
26722672 case TdsEnums . FedAuthLibrary . MSAL :
26732673 case TdsEnums . FedAuthLibrary . SecurityToken :
@@ -2682,7 +2682,7 @@ internal void OnFeatureExtAck(int featureId, byte[] data)
26822682 default :
26832683 Debug . Fail ( "Unknown _fedAuthLibrary type" ) ;
26842684 SqlClientEventSource . Log . TryTraceEvent ( "<sc.SqlInternalConnectionTds.OnFeatureExtAck|ERR> {0}, Attempting to use unknown federated authentication library" , ObjectID ) ;
2685- throw SQL . ParsingErrorLibraryType ( ParsingErrorState . FedAuthFeatureAckUnknownLibraryType , ( int ) _fedAuthFeatureExtensionData . LibraryType ) ;
2685+ throw SQL . ParsingErrorLibraryType ( ParsingErrorState . FedAuthFeatureAckUnknownLibraryType , ( int ) _fedAuthFeatureExtensionData . libraryType ) ;
26862686 }
26872687 _federatedAuthenticationAcknowledged = true ;
26882688
0 commit comments