Skip to content

Conversation

@nilo-ms
Copy link
Contributor

@nilo-ms nilo-ms commented May 1, 2025

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

@github-actions
Copy link

github-actions bot commented May 1, 2025

❌ Work item link check failed. Description does not contain AB#{ID}.

Click here to Learn more.

@Yuki-YuXin Yuki-YuXin requested a review from Copilot May 2, 2025 12:51
Copy link
Contributor

Copilot AI left a 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(),

@nilo-ms nilo-ms marked this pull request as ready for review May 8, 2025 10:34
@nilo-ms nilo-ms requested review from a team as code owners May 8, 2025 10:34
* @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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: continuation token

nilo-ms added a commit to AzureAD/microsoft-authentication-library-common-for-android that referenced this pull request May 8, 2025
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)
@nilo-ms nilo-ms merged commit d6d63db into feature/jit May 8, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants