{"id":22449451,"url":"https://github.com/anders130/apilocksmith","last_synced_at":"2025-03-27T12:15:27.572Z","repository":{"id":210992364,"uuid":"727912411","full_name":"anders130/ApiLocksmith","owner":"anders130","description":"Easy integration of ApiKey-based authentication for minimal APIs in ASP.NET Core.","archived":false,"fork":false,"pushed_at":"2023-12-26T15:25:29.000Z","size":20,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T16:26:42.347Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anders130.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-12-05T20:45:20.000Z","updated_at":"2023-12-12T14:13:51.000Z","dependencies_parsed_at":"2023-12-05T23:23:23.059Z","dependency_job_id":"be737a0f-34f8-4025-ab27-a059ba8f9cd3","html_url":"https://github.com/anders130/ApiLocksmith","commit_stats":null,"previous_names":["anders130/apilocksmith"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders130%2FApiLocksmith","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders130%2FApiLocksmith/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders130%2FApiLocksmith/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders130%2FApiLocksmith/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anders130","download_url":"https://codeload.github.com/anders130/ApiLocksmith/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245841762,"owners_count":20681195,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-06T05:09:22.650Z","updated_at":"2025-03-27T12:15:27.550Z","avatar_url":"https://github.com/anders130.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ApiLocksmith\n\nApiLocksmith is a collection of C# libraries that simplify API development with ASP.NET Core by providing easy integration of ApiKey-based authentication and Swagger documentation.\n\n## ApiLocksmith.Core\n\nThe `ApiLocksmith.Core` library allows you to add ApiKey-based authentication to your minimal APIs built with ASP.NET Core. It provides a flexible and easy-to-use solution for securing your APIs.\n\n### Usage\n\nTo use `ApiLocksmith.Core`, follow these steps:\n\n1. Install the NuGet package:\n\n    ```bash\n    dotnet add package ApiLocksmith.Core\n    ```\n\n2. Configure the ApiKeyOptions inside the `appsettings.json`:\n\n    ```json\n    {\n      \"Logging\": {\n        \"LogLevel\": {\n          \"Default\": \"Information\",\n          \"Microsoft.AspNetCore\": \"Warning\"\n        }\n      },\n      \"AllowedHosts\": \"*\",\n      \"ApiKeySettings\": {\n        \"ApiKey\": \"MySecretApiKey\",\n        \"ApiKeyHeaderName\": \"x-api-key\",\n        \"ApiKeySchemeName\": \"ApiKey\"\n      }\n    }\n    ```\n\n3. Add this to your `Program.cs`:\n\n    ```csharp\n    builder.Services.AddApiKeyAuthenticationScheme(builder.Configuration, \"ApiKeySettings\");\n    ```\n\nRefer to the [ApiLocksmith.Core documentation](./src/ApiLocksmith.Core/README.md) for detailed configuration options and usage examples.\n\n## ApiLocksmith.Swagger.FastEndpoints\n\nThe `ApiLocksmith.Swagger.FastEndpoints` library extends `ApiLocksmith.Core` by providing Swagger documentation integration with the FastEndpoints library for your APIs secured with ApiKey-based authentication.\n\n### Usage\n\nTo use `ApiLocksmith.Swagger.FastEndpoints`, follow these steps:\n\n1. Install the NuGet package:\n\n    ```bash\n    dotnet add package ApiLocksmith.Swagger.FastEndpoints\n    ```\n\n2. Add this to your `Program.cs`:\n\n    ```csharp\n    builder.Services.AddSwaggerDocumentWithApiKeyAuth(builder.Configuration, \"ApiKeySettings\");\n\n    // ...\n\n    app.UseSwaggerGen();\n    ```\n\nRefer to the [ApiLocksmith.Swagger.FastEndpoints documentation](./src/ApiLocksmith.Swagger.FastEndpoints/README.md) for detailed configuration options and usage examples.\n\n## Examples\n\nCheck out the [examples](./examples) folder for sample projects demonstrating the usage of ApiLocksmith libraries in different scenarios.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanders130%2Fapilocksmith","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanders130%2Fapilocksmith","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanders130%2Fapilocksmith/lists"}