Skip to content

feat: add VERSIONS_REQUIRE_AUTH to make versions/details auth optional#13

Closed
alfonsosastre wants to merge 5 commits intomainfrom
feat/versions-require-auth-optional
Closed

feat: add VERSIONS_REQUIRE_AUTH to make versions/details auth optional#13
alfonsosastre wants to merge 5 commits intomainfrom
feat/versions-require-auth-optional

Conversation

@alfonsosastre
Copy link
Copy Markdown
Contributor

Summary

  • Adds VERSIONS_REQUIRE_AUTH config setting (default True) to control whether the /versions and /{version}/details endpoints require authentication
  • When set to False, these endpoints are publicly accessible for OCPI discovery without a token
  • All other endpoints continue to require authentication regardless of this setting

Test plan

  • Existing auth tests for versions endpoints still pass
  • New tests confirm unauthenticated access works when VERSIONS_REQUIRE_AUTH=False (v2.2.1 and v2.3.0)
  • New tests confirm 401 is still returned for wrong tokens even when VERSIONS_REQUIRE_AUTH=False

🤖 Generated with Claude Code

Alfonso Sastre and others added 5 commits February 19, 2026 13:10
- Add VERSIONS_REQUIRE_AUTH config (default True) to allow unauthenticated
  access to /versions and /{version}/details for discovery (e.g. Payter)
- VersionsAuthorizationVerifier uses optional Authorization header when
  VERSIONS_REQUIRE_AUTH=false
- Add tests for 2.2.1 and 2.3.0 when auth is optional
- Set via VERSIONS_REQUIRE_AUTH env var

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@alfonsosastre
Copy link
Copy Markdown
Contributor Author

Closing — this was already merged as #12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant