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