feat(auth): Implement GitHub OAuth authentication flow for package publishing

- Added authentication service and GitHub OAuth integration.
- Introduced new authentication methods and structures in the model.
- Updated the API to handle authentication during the publishing process.
- Created handlers for starting and checking the status of the OAuth flow.
- Enhanced the publish handler to validate authentication credentials.
- Updated configuration to include GitHub OAuth settings.
- Added tests for the OAuth flow and publishing with authentication.
- Updated documentation to reflect changes in the API and authentication process.
This commit is contained in:
Avinash Sridhar 2025-04-28 09:40:42 -04:00 • committed by Toby Padilla
commit 2089c5aaa1

View file

@ -13,6 +13,11 @@ type Config struct {
LogLevel string `env:"LOG_LEVEL" envDefault:"info"`
Environment string `env:"ENVIRONMENT" envDefault:"production"`
Version string `env:"VERSION" envDefault:"dev"`
// GitHub OAuth settings
GithubClientID string `env:"GITHUB_CLIENT_ID" envDefault:""`
GithubClientSecret string `env:"GITHUB_CLIENT_SECRET" envDefault:""`
RequireAuth bool `env:"REQUIRE_AUTH" envDefault:"false"` // Whether to require authentication for publishing
}
// NewConfig creates a new configuration with default values