Merged
Conversation
Updated .editorconfig to suggest simple property accessors and suppress certain diagnostics. Corrected grammatical errors in documentation and removed Azure-specific rules. Updated package references in project files to newer versions and added a project reference in `SimpleAuthentication.csproj`. Refactored `ApiKeySettings.cs` and `BasicAuthenticationSettings.cs` to use `IEnumerable` and added methods for efficient handling of keys and credentials. Simplified constructors in authentication handlers and used generated regex for parsing headers. Added new files `ApiKey.cs` and `Credential.cs` for better organization.
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.
This pull request introduces several improvements and refactorings across the authentication library, focusing on API Key and Basic Authentication settings, sample project dependencies, and documentation. The most significant changes are the refactoring of how credentials and API keys are managed, the addition of helper methods for retrieving all credentials and keys, and the update of sample dependencies to the latest versions.
Authentication Settings Refactoring:
ApiKeySettingsandBasicAuthenticationSettingsto useIEnumerable<ApiKey>andIEnumerable<Credential>instead ofICollection, simplifying property management and initialization. [1] [2]GetAllApiKeys()andGetAllCredentials()to aggregate keys/credentials from both collection and individual properties, improving extensibility and correctness. [1] [2]ApiKeyandCredentialrecord definitions to their own dedicated files for better separation and clarity.Sample Project Dependency Updates:
Microsoft.AspNetCore.OpenApiandSwashbuckle.AspNetCore.SwaggerUIpackage references to the latest versions in all sample.csprojfiles, ensuring compatibility and access to new features. [1] [2] [3]Documentation and Editorial Improvements:
README.mdto enhance clarity and professionalism. [1] [2] [3] [4] [5] [6] [7] [8] [9].github/copilot-instructions.md. [1] [2]EditorConfig and Build Props Updates:
.editorconfigfor improved code consistency, and updatedNerdbank.GitVersioningto the latest version inDirectory.Build.props. [1] [2] [3]These changes collectively improve the maintainability, clarity, and reliability of the authentication library and its samples.