-
Notifications
You must be signed in to change notification settings - Fork 137
Native auth: JIT business logic #2290
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
Conversation
|
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
.../src/main/java/com/microsoft/identity/nativeauth/utils/NativeAuthCommandParametersAdapter.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces just-in-time (JIT) business logic for native authentication by updating state machine flows and integrating new result types. Key changes include:
- Adding support for StrongAuthMethodRegistrationRequired in SignInStates and NativeAuthPublicClientApplication.
- Introducing BaseJITSubmitChallengeState and refactoring RegisterStrongAuthState and RegisterStrongAuthVerificationRequiredState to handle JIT challenge flows.
- Modifying API visibility in CommandParametersAdapter.java to expose getPackageVersion for potential external usage.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| msal/src/main/java/com/microsoft/identity/nativeauth/statemachine/states/SignInStates.kt | Added new branch handling for StrongAuthMethodRegistrationRequired state. |
| msal/src/main/java/com/microsoft/identity/nativeauth/statemachine/states/JITStates.kt | Introduced BaseJITSubmitChallengeState and refactored JIT related state classes to support challenge submission flows. |
| msal/src/main/java/com/microsoft/identity/nativeauth/statemachine/results/SignInResult.kt | Updated new StrongAuthMethodRegistrationRequired result type with authMethods. |
| msal/src/main/java/com/microsoft/identity/nativeauth/NativeAuthPublicClientApplication.kt | Added logic to handle the new StrongAuthMethodRegistrationRequired branch. |
| msal/src/main/java/com/microsoft/identity/client/internal/CommandParametersAdapter.java | Changed getPackageVersion visibility from private to public. |
Comments suppressed due to low confidence (1)
msal/src/main/java/com/microsoft/identity/nativeauth/statemachine/states/RegisterStrongAuthState.kt:182
- [nitpick] If the 'scopes' field is no longer used, remove the commented-out code and associated parcel read/write operations for clarity.
scopes = parcel.createStringArrayList(),
msal/src/main/java/com/microsoft/identity/nativeauth/statemachine/states/JITStates.kt
Show resolved
Hide resolved
msal/src/main/java/com/microsoft/identity/client/internal/CommandParametersAdapter.java
Outdated
Show resolved
Hide resolved
msal/src/main/java/com/microsoft/identity/nativeauth/statemachine/states/JITStates.kt
Show resolved
Hide resolved
msal/src/main/java/com/microsoft/identity/nativeauth/statemachine/states/JITStates.kt
Outdated
Show resolved
Hide resolved
msal/src/main/java/com/microsoft/identity/nativeauth/statemachine/states/SignInStates.kt
Show resolved
Hide resolved
| * @param grantType grant type | ||
| * @param code the code provided by the user | ||
| * @param correlationId correlation ID to use in the API request, taken from the previous request in the flow | ||
| * @param continuationToken Continuation token |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: continuation token
Last PR to complete JIT feature. This PR is in draft because tests are missing. You can review it in the meantime. MSAL PR: [#2290](AzureAD/microsoft-authentication-library-for-android#2290) [AB#3188136](https://identitydivision.visualstudio.com/Engineering/_workitems/edit/3188136)
Last PR to complete JIT feature.
This PR is in draft because tests are missing. You can review it in the meantime.
Common code PR: #2637
AB#3188136