Skip to content

refactor(server): split the device flow into focused per-flow files#4892

Merged
nabokihms merged 1 commit into
masterfrom
device-flow-align
Jul 14, 2026
Merged

refactor(server): split the device flow into focused per-flow files#4892
nabokihms merged 1 commit into
masterfrom
device-flow-align

Conversation

@nabokihms

@nabokihms nabokihms commented Jul 14, 2026

Copy link
Copy Markdown
Member

Overview

Bring the device flow into the same per-flow file layout as the rest of the package (follow-up to #4891).

What this PR does / why we need it

deviceflowhandlers.go mixed the device-authorization page/request, the browser callback, and the device_code grant in one file — outside the grant_*.go family and without the per-flow header comments the rest of the package now has. It is split into device_authorize.go (the /device page, /device/code request, and user-code verification, which share the device template), device_callback.go (the /device/callback token-minting callback), and grant_devicecode.go (the device_code grant, a token.go dispatch target alongside the other grants). Tests are split to match.

Special notes for your reviewer

Pure code movement, no behaviour change: every declaration is byte-identical to the old file (only header comments were added) and the same 176 tests pass.

@nabokihms nabokihms added the release-note/ignore Ignore this change when generating release notes label Jul 14, 2026
deviceflowhandlers.go mixed the device-authorization page/request, the browser
callback, and the device_code grant in one file — outside the grant_*.go family
and without the per-flow header comments the rest of the package now has.

Split it into device_authorize.go (the /device page, /device/code request, and
user-code verification, which share the device template), device_callback.go
(the /device/callback token-minting callback), and grant_devicecode.go (the
device_code grant, a token.go dispatch target alongside the other grants). Tests
are split to match. Pure code movement; the same 176 tests pass.

Signed-off-by: maksim.nabokikh <max.nabokih@gmail.com>
@nabokihms nabokihms force-pushed the device-flow-align branch from 1382026 to 17f28c3 Compare July 14, 2026 17:44
@nabokihms nabokihms changed the title refactor(server): move the device_code grant into grant_devicecode.go refactor(server): split the device flow into focused per-flow files Jul 14, 2026
@nabokihms nabokihms merged commit 0969327 into master Jul 14, 2026
13 checks passed
@nabokihms nabokihms deleted the device-flow-align branch July 14, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/ignore Ignore this change when generating release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant