Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cheenamalhotra committed Sep 23, 2020
1 parent dca5f8f commit 33f047e
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</summary>
</ctor>
<ctor2>
<param name="applicationClientId">Client Application Id to be used for acquiring access token for federated authentication. The driver uses it's own application client id by default.</param>
<param name="applicationClientId">Client Application Id to be used for acquiring access token for federated authentication. The driver uses its own application client id by default.</param>
<summary>
Initializes the <see cref="T:Microsoft.Data.SqlClient.ActiveDirectoryAuthenticationProvider" /> class with the provided application client id.
</summary>
Expand All @@ -30,7 +30,7 @@
</ctor2>
<ctor3>
<param name="deviceCodeFlowCallbackMethod">The callback method to be used when performing 'Active Directory Device Code Flow' authentication.</param>
<param name="applicationClientId">(Optional) Client Application Id to be used for acquiring access token for federated authentication. The driver uses it's own application client id by default.</param>
<param name="applicationClientId">(Optional) Client Application Id to be used for acquiring access token for federated authentication. The driver uses its own application client id by default.</param>
<summary>
Initializes the <see cref="T:Microsoft.Data.SqlClient.ActiveDirectoryAuthenticationProvider" /> class with the provided device code flow callback method and application client id.
</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,7 @@ public SqlAuthenticationProviderManager(SqlAuthenticationProviderConfigurationSe

if (!string.IsNullOrEmpty(configSection.ApplicationClientId))
{
try
{
_applicationClientId = configSection.ApplicationClientId;
}
catch (Exception e)
{
throw SQL.CannotFetchApplicationClientId(configSection.ApplicationClientId, e);
}

_applicationClientId = configSection.ApplicationClientId;
_sqlAuthLogger.LogInfo(_typeName, methodName, "Received user-defined Application Client Id");
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,6 @@ internal static Exception CannotCreateSqlAuthInitializer(string type, Exception
return ADP.Argument(System.StringsHelper.GetString(Strings.SQL_CannotCreateAuthInitializer, type), e);
}

static internal Exception CannotFetchApplicationClientId(string type, Exception e)
{
return ADP.Argument(StringsHelper.GetString(Strings.SQL_CannotFetchApplicationClientId, type), e);
}

internal static Exception CannotInitializeAuthProvider(string type, Exception e)
{
return ADP.InvalidOperation(System.StringsHelper.GetString(Strings.SQL_CannotInitializeAuthProvider, type), e);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -1905,7 +1905,4 @@
<data name="SQL_SettingDeviceFlowWithCredential" xml:space="preserve">
<value>Cannot use 'Authentication=Active Directory Device Code Flow', if the Credential property has been set.</value>
</data>
<data name="SQL_CannotFetchApplicationClientId" xml:space="preserve">
<value>Failed to fetch application client id with type '{0}'.</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,7 @@ public SqlAuthenticationProviderManager(SqlAuthenticationProviderConfigurationSe

if (!string.IsNullOrEmpty(configSection.ApplicationClientId))
{
try
{
_applicationClientId = configSection.ApplicationClientId;
}
catch (Exception e)
{
throw SQL.CannotFetchApplicationClientId(configSection.ApplicationClientId, e);
}

_applicationClientId = configSection.ApplicationClientId;
_sqlAuthLogger.LogInfo(_typeName, methodName, "Received user-defined Application Client Id");
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,6 @@ static internal Exception CannotCreateSqlAuthInitializer(string type, Exception
return ADP.Argument(StringsHelper.GetString(Strings.SQL_CannotCreateAuthInitializer, type), e);
}

static internal Exception CannotFetchApplicationClientId(string type, Exception e)
{
return ADP.Argument(StringsHelper.GetString(Strings.SQL_CannotFetchApplicationClientId, type), e);
}

static internal Exception CannotInitializeAuthProvider(string type, Exception e)
{
return ADP.InvalidOperation(StringsHelper.GetString(Strings.SQL_CannotInitializeAuthProvider, type), e);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions src/Microsoft.Data.SqlClient/netfx/src/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -4575,7 +4575,4 @@
<data name="SQL_SettingDeviceFlowWithCredential" xml:space="preserve">
<value>Cannot use 'Authentication=Active Directory Device Code Flow', if the Credential property has been set.</value>
</data>
<data name="SQL_CannotFetchApplicationClientId" xml:space="preserve">
<value>Failed to fetch application client id with type '{0}'.</value>
</data>
</root>

0 comments on commit 33f047e

Please sign in to comment.