Skip to content

Commit c60d894

Browse files
mohitc1somalaya
authored andcommitted
Merge release/5.7.0 to dev (#2200)
Update and enable tests to run in pipeline (#2199) Enabling 2 FLW test cases, which have been disabled to run in pipeline. TestCase833513 - Updated account type and error verification TestCase833515 - Replaced Edge steps with Outlook TestCase1592468 - Removed as this is not valid Ran locally with latest RC builds to verify these are passing. Quick fix to ignore those flaky tests. Will be resolved later. (#2205) Take new common, some ui fixes, Fixes AB#3058394 (#2198) changes: - Combined https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2516613 into https://identitydivision.visualstudio.com/Engineering/_workitems/edit/2516571, test will attempt sign in with just outlook, then AuthApp + outlook, finally install cp then able to sign in. Also covers https://identitydivision.visualstudio.com/Engineering/_workitems/edit/831545 because just tests auth with outlook and CP. - Adjustments to TestCase2516967 for consistency - Take common changes [AB#3058394](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3058394) Add Account Manager Tests, enable reading local flights param in automation apps, Fixes AB#3026183 (#2207) Add Account Manager Tests, enable reading local flights param in automation apps [AB#3026183](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3026183) Migrate URIBuilder to httpcore5, Fixes AB#2909378 (#2203) Part 1 of the work to get rid msebera.httpclient. [AB#2909378](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/2909378) Migrate the usage of uribuilder to httpcore5 Update Native Auth E2E tests to use more reliable inbox code retrieval method, Fixes AB#3037823 (#2211) The original PR: #2189 Work Item: [AB#3037823](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3037823) --------- Co-authored-by: Robert McCahill <[email protected]> Adding more MSA test configs to MsalTestApp (#2209) This PR adds two more config options for MsalTestApp: - WEBVIEW_MSA: Webview selected as auth agent; Allows for MSA and AAD accounts; passkeys enabled - WEBVIEW_PPE_MSA: Webview selected as auth agent; INT MSA and PPE AAD accounts; passkeys enabled Migrate Base64 away from Msebera (in Android), Fixes AB#3077784 (#2210) [AB#3077784](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3077784) merge release/5.8.0 to dev (#2217) Remove email attribute, Fixes AB#3080769 (#2224) Remove "email" from the UserAttribute class. The email address is passed as "username" in the signUp process. Bug item description: https://dev.azure.com/IdentityDivision/Engineering/_workitems/edit/3080769 [AB#3080769](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3080769) Merging Somalaya/release/5.8.2 to dev (#2223) Co-authored-by: iamgusain <[email protected]> Android E2E Sign Up, Fixes AB#3073857 (#2213) Create a draft version instead of an official one: #2212 because the PR is still in the draft version. [AB#3073857](https://dev.azure.com/IdentityDivision/Engineering/_workitems/edit/3073857) Android Test plan: https://identitydivision.visualstudio.com/Engineering/_testPlans/define?planId=3054662&suiteId=3054727 2.1.5 2.1.6 2.1.7 (out of scopes for the Lab environment, include them once the environment is ready) 2.1.8 2.1.9 2.1.10 2.1.11 1.1.2 1.1.5 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 Add suberror for network errors, Fixes AB#3064171 (#2218) Related: AzureAD/microsoft-authentication-library-common-for-android#2537 Also make sure that MsalClientException returns the sub error code.  [AB#3064171](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3064171) automation app name changes automation app name changes automation app name changes automation app name changes tests with oneAuthTestApp updated use lab query instead of temp user removed temp user rebased and removed unnecessary code updated common ignore unnecessary test retry on failure ignored unnecessary test retry added removed retry removed duplicate retry bringing back erroneously deleted file
1 parent 14c79bf commit c60d894

File tree

51 files changed

+888
-546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+888
-546
lines changed

changelog

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@ MSAL Wiki : https://github.com/AzureAD/microsoft-authentication-library-for-andr
22

33
vNext
44
----------
5+
-[MINOR] Add suberror for network errors (#2218)
6+
7+
Version 5.8.2
8+
----------
9+
-[PATCH] Update common @18.2.2
10+
11+
Version 5.8.1
12+
----------
13+
-[PATCH] Update common @18.2.1
14+
15+
Version 5.8.0
16+
----------
17+
-[PATCH] Update common @18.2.0
18+
-[MINOR] Migrate Base64 away from Msebera (#2210)
19+
20+
Version 5.7.0
21+
----------
22+
-[PATCH] Update common @18.1.0
523
-[MINOR] Support for email OTP MFA in native authentication (#2167)
624
-[MINOR] Add legacy FIDO2 API version (#2188)
725

common

Submodule common updated 89 files

gradle/versions.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ ext {
4848
daggerVersion = "2.31.2"
4949
daggerCompilerVersion = "2.31.2"
5050
msal4jVersion = "1.10.0"
51-
mseberaApacheHttpClientVersion = "4.5.8"
5251
moshiVersion = "1.14.0"
5352
moshiAdaptersVersion = "1.14.0"
5453
openpojoVersion = "0.9.1"

msal/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ dependencies {
213213
implementation ("com.nimbusds:nimbus-jose-jwt:$rootProject.ext.nimbusVersion") {
214214
exclude module: 'asm'
215215
}
216-
implementation "cz.msebera.android:httpclient:$rootProject.ext.mseberaApacheHttpClientVersion"
216+
implementation 'org.apache.httpcomponents.core5:httpcore5:5.3'
217217
implementation "androidx.constraintlayout:constraintlayout:$rootProject.ext.constraintLayoutVersion"
218218
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$rootProject.ext.kotlinXCoroutinesVersion"
219219
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$rootProject.ext.kotlinXCoroutinesVersion"

msal/src/main/java/com/microsoft/identity/client/PublicClientApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1647,7 +1647,7 @@ private MsalException baseExceptionToMsalException(@NonNull final BaseException
16471647
);
16481648
}
16491649

1650-
return new MsalClientException(exception.getErrorCode(), exception.getMessage());
1650+
return MsalExceptionAdapter.msalExceptionFromBaseException(exception);
16511651
}
16521652

16531653
/**

msal/src/main/java/com/microsoft/identity/client/exception/MsalUiRequiredException.java

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,9 @@ public final class MsalUiRequiredException extends MsalException {
5858
*/
5959
public static final String NO_ACCOUNT_FOUND = ErrorStrings.NO_ACCOUNT_FOUND;
6060

61-
@Getter
62-
@Accessors(prefix = "m")
63-
@Nullable
64-
private String mOauthSubErrorCode;
61+
public String getOauthSubErrorCode(){
62+
return super.getSubErrorCode();
63+
}
6564

6665
/**
6766
* Constructor of MsalUiRequiredException.
@@ -90,15 +89,4 @@ public MsalUiRequiredException(final String errorCode, final String errorMessage
9089
public MsalUiRequiredException(final String errorCode, final String errorMessage, final Throwable throwable) {
9190
super(errorCode, errorMessage, throwable);
9291
}
93-
94-
/**
95-
* Constructor of MsalUiRequiredException.
96-
* @param errorCode String
97-
* @param oauthSubErrorCode String
98-
* @param errorMessage String
99-
*/
100-
public MsalUiRequiredException(final String errorCode, @Nullable final String oauthSubErrorCode, final String errorMessage) {
101-
super(errorCode, errorMessage);
102-
mOauthSubErrorCode = oauthSubErrorCode;
103-
}
10492
}

msal/src/main/java/com/microsoft/identity/client/internal/controllers/MsalExceptionAdapter.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@
4242
public class MsalExceptionAdapter {
4343

4444
public static MsalException msalExceptionFromBaseException(final BaseException e) {
45+
final MsalException result = msalExceptionFromBaseExceptionInternal(e);
46+
result.setSubErrorCode(e.getSubErrorCode());
47+
return result;
48+
}
49+
50+
private static MsalException msalExceptionFromBaseExceptionInternal(final BaseException e) {
4551
if (e instanceof MsalException) {
4652
return (MsalException) e;
4753
}
@@ -69,8 +75,8 @@ public static MsalException msalExceptionFromBaseException(final BaseException e
6975
final UiRequiredException uiRequiredException = ((UiRequiredException) e);
7076
return new MsalUiRequiredException(
7177
uiRequiredException.getErrorCode(),
72-
uiRequiredException.getOAuthSubErrorCode(),
73-
uiRequiredException.getMessage()
78+
uiRequiredException.getMessage(),
79+
uiRequiredException
7480
);
7581
}
7682

msal/src/main/java/com/microsoft/identity/nativeauth/UserAttributes.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class UserAttributes(internal val userAttributes: Map<String, String>) {
3434
private const val CITY = "city"
3535
private const val COUNTRY = "country"
3636
private const val DISPLAY_NAME = "displayName"
37-
private const val EMAIL_ADDRESS = "email"
3837
private const val GIVEN_NAME = "givenName"
3938
private const val JOB_TITLE = "jobTitle"
4039
private const val POSTAL_CODE = "postalCode"
@@ -72,15 +71,6 @@ class UserAttributes(internal val userAttributes: Map<String, String>) {
7271
return this
7372
}
7473

75-
/**
76-
* Sets the email address for the user
77-
* @param emailAddress: Email address for the user
78-
*/
79-
fun emailAddress(emailAddress: String): Builder {
80-
userAttributes[EMAIL_ADDRESS] = emailAddress
81-
return this
82-
}
83-
8474
/**
8575
* Sets the given name for the user
8676
* @param givenName: Given name for the user

msal/src/test/java/com/microsoft/identity/client/e2e/tests/mocked/AcquireTokenMockTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ public HttpResponse performIntercept(
118118
@NonNull HttpClient.HttpMethod httpMethod,
119119
@NonNull URL requestUrl,
120120
@NonNull Map<String, String> requestHeaders,
121-
@Nullable byte[] requestContent) throws IOException {
122-
throw new IOException("Sending requests to server has been disabled for mocked unit tests");
121+
@Nullable byte[] requestContent) throws ClientException {
122+
throw new ClientException("Sending requests to server has been disabled for mocked unit tests");
123123
}
124124
});
125125
}

msal/src/test/java/com/microsoft/identity/client/e2e/tests/mocked/AcquireTokenMockedTelemetryTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import com.microsoft.identity.common.java.eststelemetry.PublicApiId;
3838
import com.microsoft.identity.common.java.eststelemetry.EstsTelemetry;
3939
import com.microsoft.identity.common.java.eststelemetry.SchemaConstants;
40+
import com.microsoft.identity.common.java.exception.ClientException;
4041
import com.microsoft.identity.common.java.net.HttpClient;
4142
import com.microsoft.identity.common.java.net.HttpResponse;
4243
import com.microsoft.identity.http.HttpRequestInterceptor;
@@ -110,7 +111,7 @@ public HttpResponse performIntercept(
110111
@NonNull HttpClient.HttpMethod httpMethod,
111112
@NonNull URL requestUrl,
112113
@NonNull Map<String, String> requestHeaders,
113-
@Nullable byte[] requestContent) throws IOException {
114+
@Nullable byte[] requestContent) throws ClientException {
114115
final String correlationId = requestHeaders.get("client-request-id");
115116

116117
AcquireTokenMockedTelemetryTest.addCorrelationId(correlationId);

0 commit comments

Comments
 (0)