Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable runtime logging from new preview broker #3875

Merged
merged 3 commits into from
Dec 19, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ public async Task<MsalTokenResponse> AcquireTokenInteractiveAsync(
AuthenticationRequestParameters authenticationRequestParameters,
AcquireTokenInteractiveParameters acquireTokenInteractiveParameters)
{
using LogEventWrapper logEventWrapper = new LogEventWrapper(this);
Debug.Assert(s_lazyCore.Value != null, "Should not call this API if msal runtime init failed");
MsalTokenResponse msalTokenResponse = null;

Expand Down Expand Up @@ -197,7 +196,6 @@ public async Task<MsalTokenResponse> SignInInteractivelyAsync(
AuthenticationRequestParameters authenticationRequestParameters,
AcquireTokenInteractiveParameters acquireTokenInteractiveParameters)
{
using LogEventWrapper logEventWrapper = new LogEventWrapper(this);
MsalTokenResponse msalTokenResponse = null;
var cancellationToken = authenticationRequestParameters.RequestContext.UserCancellationToken;
Debug.Assert(s_lazyCore.Value != null, "Should not call this API if msal runtime init failed");
Expand Down Expand Up @@ -230,7 +228,6 @@ public async Task<MsalTokenResponse> AcquireTokenInteractiveDefaultUserAsync(
AuthenticationRequestParameters authenticationRequestParameters,
AcquireTokenInteractiveParameters acquireTokenInteractiveParameters)
{
using LogEventWrapper logEventWrapper = new LogEventWrapper(this);
Debug.Assert(s_lazyCore.Value != null, "Should not call this API if msal runtime init failed");

MsalTokenResponse msalTokenResponse = null;
Expand Down Expand Up @@ -271,7 +268,6 @@ public async Task<MsalTokenResponse> AcquireTokenSilentAsync(
AuthenticationRequestParameters authenticationRequestParameters,
AcquireTokenSilentParameters acquireTokenSilentParameters)
{
using LogEventWrapper logEventWrapper = new LogEventWrapper(this);
Debug.Assert(s_lazyCore.Value != null, "Should not call this API if msal runtime init failed");

var cancellationToken = authenticationRequestParameters.RequestContext.UserCancellationToken;
Expand Down Expand Up @@ -319,7 +315,6 @@ public async Task<MsalTokenResponse> AcquireTokenSilentDefaultUserAsync(
AuthenticationRequestParameters authenticationRequestParameters,
AcquireTokenSilentParameters acquireTokenSilentParameters)
{
using LogEventWrapper logEventWrapper = new LogEventWrapper(this);
Debug.Assert(s_lazyCore.Value != null, "Should not call this API if msal runtime init failed");

var cancellationToken = authenticationRequestParameters.RequestContext.UserCancellationToken;
Expand Down Expand Up @@ -349,7 +344,6 @@ public async Task<MsalTokenResponse> AcquireTokenByUsernamePasswordAsync(
AuthenticationRequestParameters authenticationRequestParameters,
AcquireTokenByUsernamePasswordParameters acquireTokenByUsernamePasswordParameters)
{
using LogEventWrapper logEventWrapper = new LogEventWrapper(this);
Debug.Assert(s_lazyCore.Value != null, "Should not call this API if msal runtime init failed");

var cancellationToken = authenticationRequestParameters.RequestContext.UserCancellationToken;
Expand Down Expand Up @@ -386,7 +380,6 @@ public async Task<MsalTokenResponse> AcquireTokenByUsernamePasswordAsync(

public async Task RemoveAccountAsync(ApplicationConfiguration appConfig, IAccount account)
{
using LogEventWrapper logEventWrapper = new LogEventWrapper(this);
Debug.Assert(s_lazyCore.Value != null, "Should not call this API if msal runtime init failed");

if (account == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,8 @@ public async Task WamUsernamePasswordRequestWithPOPAsync()

MsalAssert.AssertAuthResult(result, TokenSource.Broker, labResponse.Lab.TenantId, expectedScopes, true);

Assert.IsTrue(wastestLogger.HasLogged);
//Disabling MSALRuntime Logger check
//Assert.IsTrue(wastestLogger.HasLogged);

await VerifyPoPTokenAsync(
labResponse.App.AppId,
Expand Down