Commit 1f9b11a
authored
Native auth: Update Email OTP MFA to Match EC Implementation, Fixes AB#3351233 (#2379)
This PR updates the SDK to match the latest flow from EC.
In this new flow, the developer must always supply an auth Method to the
/oauth2/v2.0/challenge endpoint which means once the .mfaRequired error
is received from token endpoint, the /oauth2/v2.0/introspect endpoint
needs to be called to retrieve the methods which are automatically
returned to the external developer.
Furthermore, whenever calling the /token endpoint is called with an MFA
Email OTP code, the grant type should be mfa_oob
Fixes
[AB#3351233](https://identitydivision.visualstudio.com/Engineering/_workitems/edit/3351233)
MSAL Common PR:
AzureAD/microsoft-authentication-library-common-for-android#27601 parent 960bc92 commit 1f9b11a
File tree
11 files changed
+74
-943
lines changed- msal/src
- main/java/com/microsoft/identity
- client/internal
- nativeauth
- statemachine
- errors
- results
- states
- test/java/com/microsoft/identity
- client/e2e/tests/network/nativeauth
- nativeauth
11 files changed
+74
-943
lines changed- common/src/main/java/com/microsoft/identity/common/nativeauth/internal/commands/GetAuthMethodsCommand.kt-72
- common/src/main/java/com/microsoft/identity/common/nativeauth/internal/commands/MFAChallengeCommand.kt+2-2
- common/src/main/java/com/microsoft/identity/common/nativeauth/internal/controllers/NativeAuthMsalController.kt+59-142
- common/src/main/java/com/microsoft/identity/common/nativeauth/internal/util/CommandUtil.java+3-1
- common/src/test/java/com/microsoft/identity/common/internal/providers/microsoft/nativeauth/integration/SignInOAuthStrategyTest.kt+6-20
- common/src/test/java/com/microsoft/identity/common/nativeauth/internal/controllers/NativeAuthControllerTest.kt+45-91
- common/src/test/java/com/microsoft/identity/common/nativeauth/internal/util/CommandUtilTest.kt+32-1
- common4j/src/main/com/microsoft/identity/common/java/eststelemetry/PublicApiId.java-2
- common4j/src/main/com/microsoft/identity/common/java/nativeauth/commands/parameters/GetAuthMethodsCommandParameters.java-64
- common4j/src/main/com/microsoft/identity/common/java/nativeauth/commands/parameters/MFAChallengeAuthMethodCommandParameters.java+11-6
- common4j/src/main/com/microsoft/identity/common/java/nativeauth/commands/parameters/MFASelectedDefaultChallengeCommandParameters.java-64
- common4j/src/main/com/microsoft/identity/common/java/nativeauth/commands/parameters/SignInSubmitCodeCommandParameters.java+6
- common4j/src/main/com/microsoft/identity/common/java/nativeauth/controllers/results/MFACommandResult.kt-13
- common4j/src/main/com/microsoft/identity/common/java/nativeauth/controllers/results/SignInCommandResult.kt+3-6
- common4j/src/main/com/microsoft/identity/common/java/nativeauth/providers/NativeAuthConstants.kt+2
- common4j/src/main/com/microsoft/identity/common/java/nativeauth/providers/NativeAuthRequestProvider.kt+4-3
- common4j/src/main/com/microsoft/identity/common/java/nativeauth/providers/requests/signin/SignInTokenRequest.kt+3-3
- common4j/src/main/com/microsoft/identity/common/java/nativeauth/providers/responses/signin/SignInChallengeApiResponse.kt+7-23
- common4j/src/main/com/microsoft/identity/common/java/nativeauth/providers/responses/signin/SignInChallengeApiResult.kt-20
- common4j/src/main/com/microsoft/identity/common/java/nativeauth/util/ApiErrorResponseUtil.kt-4
- common4j/src/test/com/microsoft/identity/common/java/nativeauth/providers/NativeAuthRequestProviderTest.kt+4-2
- common4j/src/test/com/microsoft/identity/common/java/nativeauth/providers/NativeAuthResponseHandlerTest.kt-25
- common4j/src/testFixtures/java/com/microsoft/identity/common/nativeauth/MockApiResponseType.kt-1
Lines changed: 4 additions & 92 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
| 64 | + | |
67 | 65 | | |
68 | 66 | | |
69 | 67 | | |
| |||
778 | 776 | | |
779 | 777 | | |
780 | 778 | | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | 779 | | |
830 | 780 | | |
831 | 781 | | |
| |||
836 | 786 | | |
837 | 787 | | |
838 | 788 | | |
839 | | - | |
| 789 | + | |
840 | 790 | | |
841 | 791 | | |
842 | 792 | | |
| |||
853 | 803 | | |
854 | 804 | | |
855 | 805 | | |
856 | | - | |
857 | | - | |
| 806 | + | |
| 807 | + | |
858 | 808 | | |
859 | 809 | | |
860 | 810 | | |
| |||
927 | 877 | | |
928 | 878 | | |
929 | 879 | | |
930 | | - | |
931 | | - | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | | - | |
950 | | - | |
951 | | - | |
952 | | - | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
960 | | - | |
961 | | - | |
962 | | - | |
963 | | - | |
964 | | - | |
965 | | - | |
966 | | - | |
967 | | - | |
968 | 880 | | |
969 | 881 | | |
970 | 882 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
771 | | - | |
| 771 | + | |
| 772 | + | |
772 | 773 | | |
773 | 774 | | |
774 | 775 | | |
| |||
Lines changed: 0 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | 28 | | |
51 | 29 | | |
52 | 30 | | |
| |||
Lines changed: 0 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 48 | | |
62 | 49 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | 50 | | |
70 | 51 | | |
71 | 52 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
97 | | - | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| |||
0 commit comments