Skip to content

Add auth for create device token api - #353

Merged
lstruman merged 2 commits into
developfrom
james-dev
Sep 26, 2026
Merged

lstruman merged 2 commits into
developfrom
james-dev

Conversation

@lstruman

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI lite review requested due to automatic review settings September 26, 2026 06:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

http/router.go must honor testOnly when selecting token API authentication middleware.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds configurable authentication for the device-token creation API while preserving unauthenticated defaults.

Changes:

  • Adds token API authentication configuration and accessors.
  • Applies ApiMiddleware when enabled.
  • Adds routing, configuration, and accessor tests.
  • Documents the new setting.
File Summary
http/​webconfig_server.go Stores and exposes token API authentication settings.
http/​webconfig_server_test.go Tests defaults, middleware behavior, and accessors.
http/​router.go Selects authentication middleware for token creation; must honor testOnly.
config/​sample_webconfig.conf Documents the new configuration option.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread http/router.go Outdated
Copilot AI review requested due to automatic review settings September 26, 2026 06:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved review issues were identified.

Review effort: Lite
Findings: None

Resolved since last review (1)

@lstruman
lstruman merged commit b0c9e5d into develop Sep 26, 2026
4 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants