Skip to content

Commit

Permalink
take one client secret from options (#577)
Browse files Browse the repository at this point in the history
  • Loading branch information
jennyf19 authored Sep 15, 2020
1 parent e97d011 commit 0580848
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 7 additions & 2 deletions src/Microsoft.Identity.Web/TokenAcquisition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,14 @@ private async Task<IConfidentialClientApplication> BuildConfidentialClientApplic
_applicationOptions.Instance += "/";
}

if (!string.IsNullOrEmpty(_microsoftIdentityOptions.ClientSecret))
{
_applicationOptions.ClientSecret = _microsoftIdentityOptions.ClientSecret;
}

MicrosoftIdentityOptionsValidation.ValidateEitherClientCertificateOrClientSecret(
_applicationOptions.ClientSecret,
_microsoftIdentityOptions.ClientCertificates);
_applicationOptions.ClientSecret,
_microsoftIdentityOptions.ClientCertificates);

try
{
Expand Down
4 changes: 0 additions & 4 deletions tests/IntegrationTests/IntegrationTestService/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ public void ConfigureServices(IServiceCollection services)
{
options.ClientSecret = ccaSecret;
});
services.Configure<ConfidentialClientApplicationOptions>(options =>
{
options.ClientSecret = ccaSecret;
});
services.AddRazorPages(options =>
{
options.Conventions.AuthorizePage("/SecurePage");
Expand Down

0 comments on commit 0580848

Please sign in to comment.