Commit Graph

4 Commits

  • refactor(access): centralize configaccess.Register and remove redundant calls
    - Added centralized `configaccess.Register` invocation in `server` initialization.
    - Removed duplicate `Register` calls from `reconcile.go` and `builder.go`.
    - Simplified logic by removing unnecessary `nil` checks in provider entry collection.
  • refactor(access): migrate config-api-key provider to internal package
    - Moved `config-api-key` provider logic from SDK to the internal `config_access` package.
    - Updated provider registration and initialization to ensure proper management via `Register` function.
    - Removed redundant `config-api-key` documentation, simplifying configuration examples.
    - Adjusted related imports and reconciliations for seamless integration with the new structure.
  • refactor(access): Introduce ApplyAccessProviders helper function
    The logic for reconciling access providers, updating the manager, and logging the changes was previously handled directly in the service layer.
    
    This commit introduces a new `ApplyAccessProviders` helper function in the `internal/access` package to encapsulate this entire process. The service layer is updated to use this new helper, which simplifies its implementation and reduces code duplication.
    
    This refactoring centralizes the provider update logic and improves overall code maintainability. Additionally, the `sdk/access` package import is now aliased to `sdkaccess` for clarity.
  • refactor(access): migrate to SDKConfig for authentication and provider management
    - Replaced `config.Config` with `SDKConfig` in authentication and provider logic for consistency with SDK changes.
    - Updated provider registration, reconciliation, and build functions to align with the `SDKConfig` structure.
    - Refactored related imports and handlers to support the new configuration approach.
    - Improved clarity and reduced redundancy in API key synchronization and provider initialization.