-
- Downloads
Implement JWT Bearer authentication and update API key handling
This commit integrates JWT Bearer authentication into the application, replacing the previous API key authentication setup. The `API.csproj` file now includes the `Microsoft.AspNetCore.Authentication.JwtBearer` package. The `AuthenticationExtensions.cs` file has been updated to configure JWT authentication with specified audience and authority. The `OpenApiSecuritySchemeTransformer.cs` file has been modified to reflect the new security scheme for JWT Bearer authentication in the OpenAPI documentation. Additionally, new classes for handling API key and JWT Bearer authentication have been introduced. The `Program.cs` file has been updated to utilize the new transformers for OpenAPI document generation. The `Directory.Packages.props` file has also been updated to ensure the correct version of the JWT Bearer package is used. These changes enhance the overall security of the application.
Showing
- API/API.csproj 1 addition, 0 deletionsAPI/API.csproj
- API/Authentication/ApiKeyAuthenticationSchemeHandler.cs 33 additions, 0 deletionsAPI/Authentication/ApiKeyAuthenticationSchemeHandler.cs
- API/Authentication/AuthenticationExtensions.cs 26 additions, 8 deletionsAPI/Authentication/AuthenticationExtensions.cs
- API/Authentication/Transformers/BearerSecuritySchemeTransformer.cs 53 additions, 0 deletions...ntication/Transformers/BearerSecuritySchemeTransformer.cs
- API/Authentication/Transformers/OpenApiSecuritySchemeTransformer.cs 1 addition, 1 deletion...tication/Transformers/OpenApiSecuritySchemeTransformer.cs
- API/Program.cs 11 additions, 27 deletionsAPI/Program.cs
- Directory.Packages.props 1 addition, 0 deletionsDirectory.Packages.props
Loading
Please register or sign in to comment