Skip to content

Commit 6e3bbbd

Browse files
authored
Merge branch 'dev' into SJAIN/instance-discovery-endpoint
2 parents b9cef63 + db2e7a5 commit 6e3bbbd

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

msal4j-sdk/bnd.bnd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Export-Package: com.microsoft.aad.msal4j
1+
Export-Package: com.microsoft.aad.msal4j;version="1.13.3"
22
Automatic-Module-Name: com.microsoft.aad.msal4j

msal4j-sdk/src/integrationtest/java/com.microsoft.aad.msal4j/ClientCredentialsIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ private void assertAcquireTokenCommon_withRegion(String clientId, IClientCredent
172172

173173
ConfidentialClientApplication ccaRegion = ConfidentialClientApplication.builder(
174174
clientId, credential).
175-
authority(TestConstants.MICROSOFT_AUTHORITY).azureRegion("westus").
175+
authority("https://login.microsoft.com/microsoft.onmicrosoft.com").azureRegion("westus").
176176
build();
177177

178178
//Ensure behavior when region not specified

msal4j-sdk/src/integrationtest/java/com.microsoft.aad.msal4j/TestConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class TestConstants {
3030
public final static String COMMON_AUTHORITY_WITH_PORT = MICROSOFT_AUTHORITY_HOST_WITH_PORT + "msidlab4.onmicrosoft.com";
3131
public final static String MICROSOFT_AUTHORITY = MICROSOFT_AUTHORITY_HOST + "microsoft.onmicrosoft.com";
3232
public final static String TENANT_SPECIFIC_AUTHORITY = MICROSOFT_AUTHORITY_HOST + MICROSOFT_AUTHORITY_TENANT;
33-
public final static String REGIONAL_MICROSOFT_AUTHORITY_BASIC_HOST_WESTUS = "westus.r." + MICROSOFT_AUTHORITY_BASIC_HOST;
33+
public final static String REGIONAL_MICROSOFT_AUTHORITY_BASIC_HOST_WESTUS = "westus.login.microsoft.com";
3434

3535
public final static String ARLINGTON_ORGANIZATIONS_AUTHORITY = ARLINGTON_MICROSOFT_AUTHORITY_HOST + "organizations/";
3636
public final static String ARLINGTON_COMMON_AUTHORITY = ARLINGTON_MICROSOFT_AUTHORITY_HOST + "common/";

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@
1818

1919
class AadInstanceDiscoveryProvider {
2020

21-
private static final String DEFAULT_TRUSTED_HOST = "login.microsoftonline.com";
22-
private static final String AUTHORIZE_ENDPOINT_TEMPLATE = "https://{host}/{tenant}/oauth2/v2.0/authorize";
23-
private static final String INSTANCE_DISCOVERY_ENDPOINT_TEMPLATE = "https://{host}:{port}/common/discovery/instance";
24-
private static final String INSTANCE_DISCOVERY_REQUEST_PARAMETERS_TEMPLATE = "?api-version=1.1&authorization_endpoint={authorizeEndpoint}";
25-
private static final String HOST_TEMPLATE_WITH_REGION = "{region}.r.{host}";
26-
private static final String SOVEREIGN_HOST_TEMPLATE_WITH_REGION = "{region}.{host}";
27-
private static final String REGION_NAME = "REGION_NAME";
28-
private static final int PORT_NOT_SET = -1;
21+
private final static String DEFAULT_TRUSTED_HOST = "login.microsoftonline.com";
22+
private final static String AUTHORIZE_ENDPOINT_TEMPLATE = "https://{host}/{tenant}/oauth2/v2.0/authorize";
23+
private final static String INSTANCE_DISCOVERY_ENDPOINT_TEMPLATE = "https://{host}:{port}/common/discovery/instance";
24+
private final static String INSTANCE_DISCOVERY_REQUEST_PARAMETERS_TEMPLATE = "?api-version=1.1&authorization_endpoint={authorizeEndpoint}";
25+
private final static String HOST_TEMPLATE_WITH_REGION = "{region}.{host}";
26+
private final static String SOVEREIGN_HOST_TEMPLATE_WITH_REGION = "{region}.{host}";
27+
private final static String REGION_NAME = "REGION_NAME";
28+
private final static int PORT_NOT_SET = -1;
29+
2930
// For information of the current api-version refer: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service#versioning
3031
private static final String DEFAULT_API_VERSION = "2020-06-01";
3132
private static final String IMDS_ENDPOINT = "https://169.254.169.254/metadata/instance/compute/location?" + DEFAULT_API_VERSION + "&format=text";

0 commit comments

Comments
 (0)