Repository navigation
feat: define token-type-dependent phoneNumber handling for registration POST /sessions (#158) - #1
Closed
deepakjaiswal1 wants to merge 1 commit into
Closed
deepakjaiswal1 wants to merge 1 commit into
deepakjaiswal1 wants to merge 1 commit into
Conversation
…on POST /sessions (camaraproject#158) dds an optional phoneNumber field to POST /sessions and defines token-type-dependent subscriber identification. - Three-legged token: phoneNumber resolved from token, MUST NOT be in body (422 UNNECESSARY_IDENTIFIER). - Two-legged token: phoneNumber MUST be in body (422 MISSING_IDENTIFIER). Adds the optional phoneNumber property and the CreateSessionUnprocessable422 response. Existing (deviceId, phoneNumber) uniqueness and 409 behaviour unchanged. Signed-off-by: Deepak Jaiswal <deepak.jaiswal1@t-mobile.com>
CAMARA Validation — FAIL1 errors, 2 warnings, 30 hints | Profile: standard |
Owner
Author
|
Closing — opening against camaraproject/main. |
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.
What
Adds an optional
phoneNumberfield to the create-registration request body (POST /sessions) and defines how the subscriber is identified for both access-token types, with strict validation.Why
Resolves camaraproject#158. WebRTC registrations target softphones, which are decoupled from any SIM, so a single
deviceIdcan be associated with multiple numbers (e.g. an enterprise activating one number from its pool on a user's device). In the CAMARA model an access token resolves to at most one subscriber identity:phoneNumberserver-side.phoneNumberexplicitly.Previously the spec only covered the three-legged case, leaving no way to register a specific number under a two-legged token.
Changes
phoneNumberproperty inRegSessionRequest(references the existingPhoneNumberschema; remains out ofrequired).POST /sessionsdescription updated to specify token-type-dependent behaviour.422response (CreateSessionUnprocessable422) with codesMISSING_IDENTIFIERandUNNECESSARY_IDENTIFIER, referenced fromPOST /sessions.phoneNumbersource is correct for both token types.Behaviour (strict)
phoneNumberMUST NOT be in the body (resolved from token) →422 UNNECESSARY_IDENTIFIERif present.phoneNumberMUST be in the body →422 MISSING_IDENTIFIERif omitted.Rejecting (rather than validating) a body
phoneNumberunder a three-legged token also prevents the endpoint from being used as an MSISDN lookup/verification oracle.Compatibility
Non-breaking.
phoneNumberdid not previously exist in the request body, so no existing client could have been sending it; the new422rules therefore cannot reject previously-valid requests. The existing (deviceId,phoneNumber) uniqueness model and409 ALREADY_EXISTSbehaviour are unchanged.