You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
services.AddOpenApiDocument((configure, provider) =>
{
configure.Title = name;
configure.Description = name;
configure.Version = "1.0.0";
configure.UseControllerSummaryAsTagDescription = true;
configure.AddSecurity("oauth2", new OpenApiSecurityScheme
{
Name = "Authorization",
Type = OpenApiSecuritySchemeType.ApiKey,
Description = "The Identity Server will return an access token; this should be added to every request, using the Authorization header with the Bearer scheme.",
In = OpenApiSecurityApiKeyLocation.Header,
ExtensionData = new Dictionary<string, object>
{
{ "x-amazon-apigateway-authtype", "cognito_user_pools" },
{
"x-amazon-apigateway-authorizer", new Dictionary<string, object> {
{ "providerARNs", new []{ "${user_pool_arn}" } },
{ "identitySource", "method.request.header.Authorization" },
{ "type" , "cognito_user_pools" },
}
},
},
});
});
Results in such open api file:
securitySchemes:
oauth2:
type: apiKey
description: The Identity Server will return an access token; this should be added to every request, using the Authorization header with the Bearer scheme.
name: Authorization
in: header
x-amazon-apigateway-authtype: cognito_user_pools
x-amazon-apigateway-authorizer:
providerARNs:
- ${user_pool_arn}
identitySource: method.request.header.Authorization
i wonder why { "type" , "cognito_user_pools" } is missing from api scec? it is required field for aws api gw.
The text was updated successfully, but these errors were encountered:
Having this code with security setting:
Results in such open api file:
i wonder why { "type" , "cognito_user_pools" } is missing from api scec? it is required field for aws api gw.
The text was updated successfully, but these errors were encountered: