feat: add new endpoint for reset password - #394
Merged
Merged
Conversation
Karpakamani-r
requested review from
SandhyaBhatia,
gerfboy,
mattnichols,
meotch,
stevecl5 and
tessstoddard
as code owners
September 18, 2026 07:28
meotch
approved these changes
Sep 21, 2026
meotch
left a comment
There was a problem hiding this comment.
LGTM, I had to review the new reset_password flow to understand why we are not following the versioned() approach used by authenticate, I see that we are using one endpoint for reset_password flow now, no need to map old endpoints to new endpoints in this instance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
Adds a new versioned "Reset Password" API (20260428) that replaces the existing two-step, POST-based reset password flow with a single PUT-based endpoint, as per the MDX spec. This aligns the reset password flow with the pattern already used by other versioned MDX endpoints (a single PUT request/response using challenges, with no separate initiate/answer split).
The previous POST-based flow (
POST /reset_passwordandPUT /reset_password/challenges/{challengeId}) is marked@Deprecatedbut left fully functional, no accessor is required to implement the new endpoint immediately, and existing accessors continue to work unchanged.Jira: MC-14857
Fixes # (issue)
Public API Additions/Changes
New model
com.mx.path.model.mdx.model.id.v20260428.ResetPassword- new versioned model withusername(String) andchallenges(List<Challenge>). Unlike the deprecatedcom.mx.path.model.mdx.model.id.ResetPassword, there is no singularchallengefield - onlychallenges, consistent with newer versioned models.New accessor method
IdBaseAccessor.resetPassword20260428(ResetPassword)— new@GatewayAPI/@API-annotated method, returningAccessorResponse<v20260428.ResetPassword>. Default implementation throwsAccessorMethodNotImplementedException, matching the pattern of every other optional accessor method. Connector accessors that want to support the new flow must override this method.New endpoint
PUT /reset_password(consumesapplication/vnd.mx.api.v1+json) — added toAuthenticationController, callinggateway().id().resetPassword20260428(...). Always discards any existing session and creates a new one (same session-reset semantics as the oldPOST /reset_password). Returns204 No Contenton success (empty result) or202 Acceptedwith challenges when further input is required.Downstream Consumer Impact
No breaking changes. This is a purely additive change:
POST /reset_password,PUT /reset_password/challenges/{challengeId}) continue to work exactly as before.resetPassword20260428has a default implementation that throwsAccessorMethodNotImplementedException, matching the behavior gateways already have for any unimplemented optional method.PUT /reset_passwordendpoint are entirely unaffected.Behavior change for clients who adopt the new endpoint:
PUT /reset_passwordnow creates a brand-new session on every call (discarding any existing session), same as the deprecatedPOST /reset_passworddid — this is intentional and matches the old entry-point semantics.Migration for accessor implementers: to support the new flow, override
resetPassword20260428(ResetPassword)in yourIdBaseAccessorsubclass. No changes are required to keep using the deprecated flow, but new integrations should implement the new method, since the old flow is deprecated and may be removed in a future major version.How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: