• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 19135064255

06 Nov 2025 12:05PM UTC coverage: 48.382% (-0.03%) from 48.415%
19135064255

push

github

web-flow
Add constants for auth strategy types (#2477)

* Add constants for auth strategy types

Replace magic strings with constants in vMCP auth system
to improve type safety and prevent typos. This makes the
code more maintainable and refactoring easier.

Strategy type constants (StrategyTypeHeaderInjection,
StrategyTypeUnauthenticated) and metadata key constants
(MetadataHeaderName, MetadataHeaderValue) are now defined
in pkg/vmcp/auth/strategies/constants.go.

Fixes #2466

* Replace remaining magic strings with constants in auth system

Address review feedback by replacing magic strings in:
- pkg/vmcp/auth/factory/outgoing.go: Use strategy type constants
- pkg/vmcp/config/validator.go: Use strategy type and metadata constants

Co-authored-by: Juan Antonio Osorio <JAORMX@users.noreply.github.com>

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Juan Antonio Osorio <JAORMX@users.noreply.github.com>

15 of 20 new or added lines in 5 files covered. (75.0%)

24 existing lines in 6 files now uncovered.

22082 of 45641 relevant lines covered (48.38%)

37.14 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

82.83
/pkg/transport/proxy/httpsse/http_proxy.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc