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

Fix warnings. #4284

Merged
merged 1 commit into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -18,7 +18,6 @@ public AdfsAuthority(AuthorityInfo authorityInfo)
{
}


internal override Task<string> GetTokenEndpointAsync(RequestContext requestContext)
{
string tokenEndpoint = string.Format(
Expand Down
1 change: 0 additions & 1 deletion src/client/Microsoft.Identity.Client/MsalErrorMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ public static string iOSBrokerKeySaveFailed(string keyChainResult)
"\nThis may occur if there are issues with your ADFS configuration. See https://aka.ms/msal-net-iwa-troubleshooting for more details." +
"\nEnable logging to see more details. See https://aka.ms/msal-net-logging.";


public const string InternalErrorCacheEmptyUsername =
"Internal error - trying to remove an MSAL user with an empty username. Possible cache corruption. See https://aka.ms/adal_token_cache_serialization. ";
public const string InternalErrorCacheEmptyIdentifier =
Expand Down
1 change: 0 additions & 1 deletion src/client/Microsoft.Identity.Client/MsalException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ private set
public IReadOnlyDictionary<string, string> AdditionalExceptionData { get; set; }
= CollectionHelpers.GetEmptyDictionary<string, string>();


/// <summary>
/// Creates and returns a string representation of the current exception.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public bool IsBrokerAvailable()
}

/// <inheritdoc cref="IPublicClientApplication.AcquireTokenInteractive(IEnumerable{string})"/>
[CLSCompliant(false)]
[CLSCompliant(false)]
public AcquireTokenInteractiveParameterBuilder AcquireTokenInteractive(
IEnumerable<string> scopes)
{
Expand All @@ -109,6 +109,7 @@ public AcquireTokenInteractiveParameterBuilder AcquireTokenInteractive(
.WithParentActivityOrWindowFunc(ServiceBundle.Config.ParentActivityOrWindowFunc);
}

/// <inheritdoc/>
public AcquireTokenWithDeviceCodeParameterBuilder AcquireTokenWithDeviceCode(
IEnumerable<string> scopes,
Func<DeviceCodeResult, Task> deviceCodeResultCallback)
Expand All @@ -119,6 +120,7 @@ public AcquireTokenWithDeviceCodeParameterBuilder AcquireTokenWithDeviceCode(
deviceCodeResultCallback);
}

/// <inheritdoc/>
AcquireTokenByRefreshTokenParameterBuilder IByRefreshToken.AcquireTokenByRefreshToken(
IEnumerable<string> scopes,
string refreshToken)
Expand All @@ -129,14 +131,16 @@ AcquireTokenByRefreshTokenParameterBuilder IByRefreshToken.AcquireTokenByRefresh
refreshToken);
}

/// <inheritdoc/>
public AcquireTokenByIntegratedWindowsAuthParameterBuilder AcquireTokenByIntegratedWindowsAuth(
IEnumerable<string> scopes)
{
return AcquireTokenByIntegratedWindowsAuthParameterBuilder.Create(
ClientExecutorFactory.CreatePublicClientExecutor(this),
scopes);
}


/// <inheritdoc/>
[Obsolete("Using SecureString is not recommended. Use AcquireTokenByUsernamePassword(IEnumerable<string> scopes, string username, string password) instead.", false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public AcquireTokenByUsernamePasswordParameterBuilder AcquireTokenByUsernamePassword(
Expand All @@ -151,6 +155,7 @@ public AcquireTokenByUsernamePasswordParameterBuilder AcquireTokenByUsernamePass
new string(password.PasswordToCharArray()));
}

/// <inheritdoc/>
public AcquireTokenByUsernamePasswordParameterBuilder AcquireTokenByUsernamePassword(
IEnumerable<string> scopes,
string username,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ internal static List<T> FilterWithLogging<T>(
list = list.Where(predicate).ToList();
}


logger.Verbose(() => $"{logPrefix} - item count after: {list.Count} ");


return list;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ internal static class AsyncUtils
return cancellationToken.IsCancellationRequested ? FromCanceled<T>(cancellationToken) : null;
}


// From 4.6 on we could use Task.FromCanceled(), but we need an equivalent for
// previous frameworks.
public static Task FromCanceled(this CancellationToken cancellationToken)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ public async Task LongRunningObo_TestAsync()
IReadOnlyList<string> middleTierApiScopes = new List<string>() { OBOServicePpeClientID + "/.default" };
IReadOnlyList<string> downstreamApiScopes = new List<string>() { OBOServiceDownStreamApiPpeClientID + "/.default" };


var clientConfidentialApp = ConfidentialClientApplicationBuilder
.Create(OBOClientPpeClientID)
.WithAuthority(PPEAuthenticationAuthority)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ public async Task WamListWindowsWorkAndSchoolAccountsAsync()
})
.Build();


// Acquire token using username password
var result = await pca.AcquireTokenByUsernamePassword(scopes, labResponse.User.Upn, labResponse.User.GetOrFetchPassword()).ExecuteAsync().ConfigureAwait(false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public void WithTenantIdAtRequestLevel_Noop_AdfsGeneric(string inputAuthority)
"The tenant id should have been changed");
}


[DataTestMethod]
[DataRow(TestConstants.DstsAuthorityCommon)]
[DataRow(TestConstants.DstsAuthorityTenanted)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ public void CiamWithAuthorityTransformationTest(string authority, string expecte
Assert.AreEqual(expectedAuthority, effectiveAuthority);
}


[DataTestMethod]
[DataRow("https://app.ciamlogin.com/")]
[DataRow("https://app.ciamlogin.com/d57fb3d4-4b5a-4144-9328-9c1f7d58179d")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ public void WamOnWin10()

pcaBuilder = pcaBuilder.WithBroker(new BrokerOptions(BrokerOptions.OperatingSystems.Windows));


Assert.IsTrue(pcaBuilder.IsBrokerAvailable());

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ public async Task JsonWebTokenWithX509PublicCertSendCertificateWithClaimsTestSen
harness.HttpManager.AddMockHandler(CreateTokenResponseHttpHandlerWithX5CValidation(
true, expectX5c ? exportedCertificate : null));


var builder = app.AcquireTokenForClient(TestConstants.s_scope);

if (requestFlag != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,6 @@ private void CreateApplication(AssertionType assertionType = AssertionType.Secre
TokenCacheHelper.PopulateCache(_cca.UserTokenCacheInternal.Accessor);
}


private AppTokenProviderResult GetAppTokenProviderResult(string differentScopesForAt = "", long? refreshIn = 1000)
{
var token = new AppTokenProviderResult();
Expand Down
Loading