feat: add VERSIONS_REQUIRE_AUTH to make versions/details auth optional#12
Merged
alfonsosastre merged 3 commits intomainfrom Feb 19, 2026
Merged
Conversation
- 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>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
VERSIONS_REQUIRE_AUTHconfig parameter (defaulttrue) to allow unauthenticated access to/versionsand/{version}/detailsendpoints for discovery.Changes
VERSIONS_REQUIRE_AUTH: bool = Truesetting (env:VERSIONS_REQUIRE_AUTH)VersionsAuthorizationVerifieruses optionalAuthorizationheader whenVERSIONS_REQUIRE_AUTH=falseUsage
Set
VERSIONS_REQUIRE_AUTH=falseto allow Payter and other PTPs to discover versions/details without auth. Other endpoints still require authentication.Testing
VERSIONS_REQUIRE_AUTH=falseMade with Cursor