Merge pull request 'Add the code to retrieve the idToken instead of accessToken in google authentication' (#7) from feature/use-id-token into development

Reviewed-on: https://gitea.white-enciso.pro/AgileWebs/Core.Thalos.BuildingBlocks/pulls/7
Reviewed-by: efrain_marin <efrain.marin@agilewebs.com>
Reviewed-by: Sergio Matías <sergio.matias@agilewebs.com>
This commit is contained in:
OscarMmtz 2025-08-28 17:39:55 +00:00
commit 806b5242b0

View File

@ -10,6 +10,7 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
using Swashbuckle.AspNetCore.SwaggerUI;
@ -114,6 +115,12 @@ namespace Core.Thalos.BuildingBlocks.Configuration
c.AddSecurityDefinition(googleScheme, new OpenApiSecurityScheme
{
Type = SecuritySchemeType.OAuth2,
Extensions = new Dictionary<string, IOpenApiExtension>
{
["x-tokenName"] = new OpenApiString("id_token")
},
Flows = new OpenApiOAuthFlows
{
AuthorizationCode = new OpenApiOAuthFlow