Skip to content

Commit 1e1cca4

Browse files
committed
Missed to save these files
1 parent 962a0ce commit 1e1cca4

File tree

3 files changed

+1
-37
lines changed

3 files changed

+1
-37
lines changed

msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/ManagedIdentityApplication.java

-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55

66
import org.slf4j.LoggerFactory;
77

8-
import java.util.HashSet;
98
import java.util.List;
10-
import java.util.Set;
119
import java.util.concurrent.CompletableFuture;
1210

1311
/**

msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/ManagedIdentityParameters.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
package com.microsoft.aad.msal4j;
55

66
import java.util.List;
7-
import java.util.Map;
87
import java.util.Set;
98

109
/**
@@ -30,7 +29,7 @@ public Set<String> scopes() {
3029

3130
@Override
3231
public ClaimsRequest claims() {
33-
return (claims != null) ? ClaimsRequest.fromJsonString(claims) : null;
32+
return (claims != null) ? ClaimsRequest.formatAsClaimsRequest(claims) : null;
3433
}
3534

3635
@Override

msal4j-sdk/src/test/java/com/microsoft/aad/msal4j/ManagedIdentityTests.java

-33
Original file line numberDiff line numberDiff line change
@@ -232,39 +232,6 @@ void managedIdentityTest_UserAssigned_SuccessfulResponse(ManagedIdentitySourceTy
232232
verify(httpClientMock, times(1)).send(any());
233233
}
234234

235-
@Test
236-
void managedIdentityTest_TokenRevocation() throws Exception {
237-
IEnvironmentVariables environmentVariables = new EnvironmentVariablesHelper(ManagedIdentitySourceType.APP_SERVICE, appServiceEndpoint);
238-
ManagedIdentityApplication.setEnvironmentVariables(environmentVariables);
239-
DefaultHttpClient httpClientMock = mock(DefaultHttpClient.class);
240-
241-
when(httpClientMock.send(expectedRequest(ManagedIdentitySourceType.APP_SERVICE, resource))).thenReturn(expectedResponse(200, getSuccessfulResponse(resource)));
242-
243-
miApp = ManagedIdentityApplication
244-
.builder(ManagedIdentityId.systemAssigned())
245-
.httpClient(httpClientMock)
246-
.build();
247-
248-
// Clear caching to avoid cross test pollution.
249-
miApp.tokenCache().accessTokens.clear();
250-
251-
IAuthenticationResult result = miApp.acquireTokenForManagedIdentity(
252-
ManagedIdentityParameters.builder(resource)
253-
.build()).get();
254-
255-
assertNotNull(result.accessToken());
256-
257-
// Simulate token revocation by clearing the cache
258-
miApp.tokenCache().accessTokens.clear();
259-
260-
result = miApp.acquireTokenForManagedIdentity(
261-
ManagedIdentityParameters.builder(resource)
262-
.build()).get();
263-
264-
assertNotNull(result.accessToken());
265-
verify(httpClientMock, times(2)).send(any());
266-
}
267-
268235
@Test
269236
void managedIdentityTest_RefreshOnHalfOfExpiresOn() throws Exception {
270237
//All managed identity flows use the same AcquireTokenByManagedIdentitySupplier where refreshOn is set,

0 commit comments

Comments
 (0)