Skip to content

Commit e110757

Browse files
committed
inline
1 parent 5e682f8 commit e110757

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SSPI/SspiContextProvider.cs

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,14 @@ string serverSpn
2626
_physicalStateObj = physicalStateObj;
2727
_serverInfo = serverInfo;
2828

29-
_authParam = CreateAuthParams(serverSpn);
29+
var options = parser.Connection.ConnectionOptions;
30+
31+
_authParam = new SspiAuthenticationParameters(options.DataSource, serverSpn)
32+
{
33+
DatabaseName = options.InitialCatalog,
34+
UserId = options.UserID,
35+
Password = options.Password,
36+
};
3037

3138
Initialize();
3239
}
@@ -48,18 +55,6 @@ internal void WriteSSPIContext(ReadOnlySpan<byte> receivedBuff, IBufferWriter<by
4855
}
4956
}
5057

51-
private SspiAuthenticationParameters CreateAuthParams(string serverSpn)
52-
{
53-
var options = _parser.Connection.ConnectionOptions;
54-
55-
return new SspiAuthenticationParameters(options.DataSource, serverSpn)
56-
{
57-
DatabaseName = options.InitialCatalog,
58-
UserId = options.UserID,
59-
Password = options.Password,
60-
};
61-
}
62-
6358
private bool RunGenerateSspiClientContext(ReadOnlySpan<byte> incomingBlob, IBufferWriter<byte> outgoingBlobWriter, SspiAuthenticationParameters authParams)
6459
{
6560
try

0 commit comments

Comments
 (0)