89 references to SqlAuthenticationMethod
System.Data (89)
fx\src\data\System\Data\Common\DbConnectionStringCommon.cs (30)
592
internal static bool TryConvertToAuthenticationType(string value, out
SqlAuthenticationMethod
result)
594
Debug.Assert(Enum.GetNames(typeof(
SqlAuthenticationMethod
)).Length == 5, "SqlAuthenticationMethod enum has changed, update needed");
600
result =
SqlAuthenticationMethod
.SqlPassword;
605
result =
SqlAuthenticationMethod
.ActiveDirectoryPassword;
610
result =
SqlAuthenticationMethod
.ActiveDirectoryIntegrated;
615
result =
SqlAuthenticationMethod
.ActiveDirectoryInteractive;
683
internal static bool IsValidAuthenticationTypeValue(
SqlAuthenticationMethod
value) {
684
Debug.Assert(Enum.GetNames(typeof(
SqlAuthenticationMethod
)).Length == 5, "SqlAuthenticationMethod enum has changed, update needed");
685
return value ==
SqlAuthenticationMethod
.SqlPassword
686
|| value ==
SqlAuthenticationMethod
.ActiveDirectoryPassword
687
|| value ==
SqlAuthenticationMethod
.ActiveDirectoryIntegrated
688
|| value ==
SqlAuthenticationMethod
.ActiveDirectoryInteractive
689
|| value ==
SqlAuthenticationMethod
.NotSpecified;
692
internal static string AuthenticationTypeToString(
SqlAuthenticationMethod
value)
698
case
SqlAuthenticationMethod
.SqlPassword:
700
case
SqlAuthenticationMethod
.ActiveDirectoryPassword:
702
case
SqlAuthenticationMethod
.ActiveDirectoryIntegrated:
704
case
SqlAuthenticationMethod
.ActiveDirectoryInteractive:
711
internal static
SqlAuthenticationMethod
ConvertToAuthenticationType(string keyword, object value)
719
SqlAuthenticationMethod
result;
740
SqlAuthenticationMethod
eValue;
742
if (value is
SqlAuthenticationMethod
)
745
eValue = (
SqlAuthenticationMethod
)value;
752
throw ADP.ConvertFailed(value.GetType(), typeof(
SqlAuthenticationMethod
), null);
759
eValue = (
SqlAuthenticationMethod
)Enum.ToObject(typeof(
SqlAuthenticationMethod
), value);
765
throw ADP.ConvertFailed(value.GetType(), typeof(
SqlAuthenticationMethod
), e);
776
throw ADP.InvalidEnumerationValue(typeof(
SqlAuthenticationMethod
), (int)eValue);
898
internal static readonly
SqlAuthenticationMethod
Authentication =
SqlAuthenticationMethod
.NotSpecified;
fx\src\data\System\Data\SqlClient\SqlConnection.cs (6)
476
return opt != null ? opt.Authentication ==
SqlAuthenticationMethod
.ActiveDirectoryIntegrated : false;
480
return opt != null ? opt.Authentication !=
SqlAuthenticationMethod
.NotSpecified : false;
1522
(connectionOptions.Authentication ==
SqlAuthenticationMethod
.SqlPassword || connectionOptions.Authentication ==
SqlAuthenticationMethod
.ActiveDirectoryPassword) &&
2047
if (connectionOptions.IntegratedSecurity || connectionOptions.Authentication ==
SqlAuthenticationMethod
.ActiveDirectoryIntegrated) {
2103
if (connectionOptions.IntegratedSecurity || connectionOptions.Authentication ==
SqlAuthenticationMethod
.ActiveDirectoryIntegrated) {
fx\src\data\System\Data\SqlClient\SqlConnectionFactory.cs (3)
68
if (opt.IntegratedSecurity || opt.Authentication ==
SqlAuthenticationMethod
.ActiveDirectoryIntegrated) {
161
if (opt.Authentication ==
SqlAuthenticationMethod
.ActiveDirectoryInteractive) {
172
opt.IntegratedSecurity || opt.Authentication ==
SqlAuthenticationMethod
.ActiveDirectoryIntegrated,
fx\src\data\System\Data\SqlClient\SqlConnectionString.cs (9)
62
internal static readonly
SqlAuthenticationMethod
Authentication =
SqlAuthenticationMethod
.NotSpecified;
210
private readonly
SqlAuthenticationMethod
_authType;
467
if (Authentication !=
SqlAuthenticationMethod
.NotSpecified && _integratedSecurity == true) {
471
if (Authentication == SqlClient.
SqlAuthenticationMethod
.ActiveDirectoryIntegrated && (HasUserIdKeyword || HasPasswordKeyword)) {
475
if (Authentication ==
SqlAuthenticationMethod
.ActiveDirectoryInteractive && !HasUserIdKeyword) {
479
if (Authentication ==
SqlAuthenticationMethod
.ActiveDirectoryInteractive && HasPasswordKeyword) {
555
internal
SqlAuthenticationMethod
Authentication { get { return _authType; } }
824
internal
SqlAuthenticationMethod
ConvertValueToAuthenticationType() {
fx\src\data\System\Data\SqlClient\SqlConnectionStringBuilder.cs (7)
130
private
SqlAuthenticationMethod
_authentication = DbConnectionStringDefaults.Authentication;
564
public
SqlAuthenticationMethod
Authentication {
568
throw ADP.InvalidEnumerationValue(typeof(
SqlAuthenticationMethod
), (int)value);
922
private static
SqlAuthenticationMethod
ConvertToAuthenticationType(string keyword, object value) {
940
if (value is
SqlAuthenticationMethod
) {
941
return DbConnectionStringBuilderUtil.AuthenticationTypeToString((
SqlAuthenticationMethod
)value);
1190
private void SetAuthenticationValue(
SqlAuthenticationMethod
value) {
fx\src\data\System\Data\SqlClient\SqlInternalConnectionTds.cs (12)
1306
|| (ConnectionOptions.Authentication ==
SqlAuthenticationMethod
.ActiveDirectoryIntegrated && !_fedAuthRequired);
1324
if (ConnectionOptions.Authentication ==
SqlAuthenticationMethod
.ActiveDirectoryPassword
1325
|| ConnectionOptions.Authentication ==
SqlAuthenticationMethod
.ActiveDirectoryInteractive
1326
|| (ConnectionOptions.Authentication ==
SqlAuthenticationMethod
.ActiveDirectoryIntegrated && _fedAuthRequired)) {
1669
connectionOptions.Authentication ==
SqlAuthenticationMethod
.ActiveDirectoryPassword ||
1670
connectionOptions.Authentication ==
SqlAuthenticationMethod
.ActiveDirectoryIntegrated ||
1671
connectionOptions.Authentication ==
SqlAuthenticationMethod
.ActiveDirectoryInteractive;
2203
|| ConnectionOptions.Authentication ==
SqlAuthenticationMethod
.ActiveDirectoryInteractive
2204
|| (ConnectionOptions.Authentication ==
SqlAuthenticationMethod
.ActiveDirectoryIntegrated && _fedAuthRequired),
2390
case
SqlAuthenticationMethod
.ActiveDirectoryIntegrated:
2399
case
SqlAuthenticationMethod
.ActiveDirectoryInteractive:
2408
case
SqlAuthenticationMethod
.ActiveDirectoryPassword:
fx\src\data\System\Data\SqlClient\SqlUtil.cs (2)
261
static internal Exception CredentialsNotProvided(
SqlAuthenticationMethod
auth) {
341
static internal Exception UnsupportedSqlAuthenticationMethod(
SqlAuthenticationMethod
authentication) {
fx\src\data\System\Data\SqlClient\TdsParser.cs (17)
403
SqlAuthenticationMethod
authType,
427
if (integratedSecurity || authType ==
SqlAuthenticationMethod
.ActiveDirectoryIntegrated) {
435
if (authType ==
SqlAuthenticationMethod
.ActiveDirectoryPassword) {
438
else if (authType ==
SqlAuthenticationMethod
.SqlPassword) {
441
else if (authType ==
SqlAuthenticationMethod
.ActiveDirectoryInteractive) {
561
if (authType ==
SqlAuthenticationMethod
.ActiveDirectoryPassword || (authType ==
SqlAuthenticationMethod
.ActiveDirectoryIntegrated && _connHandler._fedAuthRequired)) {
872
private PreLoginHandshakeStatus ConsumePreLoginHandshake(
SqlAuthenticationMethod
authType, bool encrypt, bool trustServerCert, bool integratedSecurity, out bool marsCapable, out bool fedAuthRequired) {
988
bool shouldValidateServerCert = (encrypt && !trustServerCert) || ((authType !=
SqlAuthenticationMethod
.NotSpecified || _connHandler._accessTokenInBytes != null) && !trustServerCert);
1076
&& _connHandler.ConnectionOptions.Authentication !=
SqlAuthenticationMethod
.NotSpecified)
7033
case
SqlAuthenticationMethod
.ActiveDirectoryPassword:
7036
case
SqlAuthenticationMethod
.ActiveDirectoryIntegrated:
7039
case
SqlAuthenticationMethod
.ActiveDirectoryInteractive:
7621
SqlAuthenticationMethod
authentication =
SqlAuthenticationMethod
.NotSpecified;
7628
Debug.Assert(authentication ==
SqlAuthenticationMethod
.ActiveDirectoryIntegrated || authentication ==
SqlAuthenticationMethod
.ActiveDirectoryPassword);
fx\src\data\System\Data\SqlClient\TdsParserHelperClasses.cs (3)
77
internal
SqlAuthenticationMethod
authentication;
439
internal
SqlAuthenticationMethod
authentication =
SqlAuthenticationMethod
.NotSpecified; // Authentication type