Skip to content

port: MyAccount Password enrollment to v4#1004

Open
pmathew92 wants to merge 1 commit into
v4_developmentfrom
port/myaccount-password
Open

port: MyAccount Password enrollment to v4#1004
pmathew92 wants to merge 1 commit into
v4_developmentfrom
port/myaccount-password

Conversation

@pmathew92

Copy link
Copy Markdown
Contributor

Summary

Ports the MyAccount Password enrollment feature (PR #1003 on main) into v4_development, following the established feature-by-feature port model.

Adds two-step password enrollment to MyAccountAPIClient:

  • enrollPassword(userIdentity?, connection?)POST /me/v1/authentication-methods with type=password, returns a PasswordEnrollmentChallenge (HTTP 202) carrying the connection's PasswordPolicy.
  • verifyPassword(authenticationMethodId, authSession, newPassword)POST /me/v1/authentication-methods/{id}/verify, returns a PasswordAuthenticationMethod (HTTP 201).

Changes

  • New result/PasswordPolicy.kt — typed policy model (PasswordPolicy + PasswordComplexity/PasswordProfileData/PasswordHistory/PasswordDictionary).
  • result/EnrollmentChallenge.kt — new PasswordEnrollmentChallenge subclass + policy discriminator branch in the polymorphic deserializer.
  • myaccount/MyAccountAPIClient.ktenrollPassword / verifyPassword methods (DPoP-aware, reusing the existing MyAccount DPoP plumbing) + new_password param key.
  • Tests: 6 new cases in MyAccountAPIClientTest (payload, policy parsing, verify, DPoP header) plus mock-server helpers.
  • EXAMPLES.md — "Enroll a Password Method" section + TOC entry.

Test plan

  • ./gradlew :auth0:testDebugUnitTest --tests "com.auth0.android.myaccount.MyAccountAPIClientTest" — 42 tests green
  • Full :auth0 suite — ./gradlew :auth0:testDebugUnitTest — all green, no regressions

@pmathew92 pmathew92 requested a review from a team as a code owner July 7, 2026 10:06
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bbcee165-7554-4a85-9593-71fd00760b90

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch port/myaccount-password

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant