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.
Add Token-Based Authentication for Component Publishing
This PR introduces token-based authentication as an alternative to username/password authentication for publishing components to OpenComponents registries. This enhancement improves security and aligns with modern authentication practices.
Key Changes
Authentication Enhancement:
tokenparameter support to thepublishcommand CLI interfaceputComponentmethod)Code Quality Improvements:
@ts-expect-errorwith@ts-ignorefor better TypeScript compatibilityDependency Updates:
Registry API Optimization:
Usage
The new token authentication can be used alongside existing username/password authentication:
The authentication system automatically detects the provided credential type and uses the appropriate method for registry communication.
Technical Details
The implementation maintains backward compatibility while adding the new authentication method. Token authentication uses the
Authorization: Bearer <token>header format, following OAuth 2.0 standards. The credential resolution logic prioritizes tokens over basic authentication when both are provided, ensuring consistent behavior across different deployment scenarios.