Repository navigation
feat(api): a phone names its installation with its code (MobileTokenRequest, openapi 0.1.3658) - #317
Merged
Merged
Conversation
…equest, openapi 0.1.3658) As TeamCode's companion sends its installation id, device name and platform with its login (docs/devices.md), the app sends them with the code of its browser sign-in, so that a phone is one device. ostrom-server#686 serves them on POST /api/v1/auth/mobile/token. - MobileTokenRequest: optional installationId, deviceName, platform and osVersion, the names and bounds of DeviceLoginStart. - AuthClient.exchangeMobileCode takes them, defaulted to null, as startDeviceLogin does. - client/openapi.version: 0.1.3658 (ostrom-server Build 3658, with #686). ContractTest passes against it; ServerGaps stays empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: NathanFallet <contact@nathanfallet.me>
Review of #317. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: NathanFallet <contact@nathanfallet.me>
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
TeamCode's companion sends its installation id, device name and platform with its login (
LoginRequest, docs/devices.md). Ostrom's phones sign in throughPOST /api/v1/auth/mobile/token, which ostrom-server#686 now accepts with the same four fields asDeviceLoginStart. This PR adds them to the contract:MobileTokenRequestgets the optionalinstallationId,deviceName,platformandosVersion. Their KDoc points toDeviceLimitsandDevicePlatforms.AuthClient.exchangeMobileCodetakes the same four values, each defaulting tonullas instartDeviceLogin. Calls with three arguments still compile and send only the code.client/openapi.versionmoves to 0.1.3658 (ostrom-server Build 3658, which includes #686).Contract
ContractTestpasses against that document andServerGapsstays empty. I checked it locally withOSTROM_OPENAPI_REQUIRED=trueand theopenapi-generatedartifact of server#686's CI (MobileTokenRequesthas the four nullable properties there).How tested
:apiand:client: detekt, jvmTest and koverVerify pass. The new testaPhoneNamesItsInstallationWithTheCodechecks the exact JSON body.The app PR that bumps core and sends the fields from the phone follows this one.
🤖 Generated with Claude Code