Extract OidcScopes::SUPPORTED as the shared scope list

The supported-scope list lived on OidcController, so the device authorization
controller (and a test) had to reach across into OidcController::SUPPORTED_SCOPES.
Move it to a shared OidcScopes::SUPPORTED module — one source of truth for the
OIDC controller, the device flow, and consent handling — and update every
reference. No behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016Q4ATZHoMCWqvSpE2yYoie
This commit is contained in:
Dan Milne
2026-07-19 14:42:39 +10:00
co-authored by Claude Opus 4.8
parent f65f8da2e7
commit 6c4be7199c
4 changed files with 13 additions and 7 deletions
@@ -80,7 +80,7 @@ class DeviceAuthorizationsController < ApplicationController
end
def granted_scopes(device_code)
device_code.scope.to_s.split & OidcController::SUPPORTED_SCOPES
device_code.scope.to_s.split & OidcScopes::SUPPORTED
end
def record_consent(device_code, user)