Compare commits

...

11 Commits

Author SHA1 Message Date
Sergio Matias
8b0a0c6bc8 Fix Add tenant id property to user 2025-08-31 18:01:35 -06:00
Sergio Matias
95e64b8431 Point thalos vault 2025-08-30 21:19:07 -06:00
Oscar Morales
574d0fb5ba Uncomment Authorization 2025-08-29 16:00:44 -06:00
Sergio Matias
5434f292c6 Update hashi corp vault configuration 2025-08-29 15:30:58 -06:00
Sergio Matias
c4f6972aa2 update app settings 2025-08-29 15:16:57 -06:00
OscarMmtz
4a3fb91ffe Merge pull request 'Update the Thalos.BuildingBlocks library to retrieve the idToken instead of accessToken from google authentication' (#6) from feature/use-id-token into development
Reviewed-on: https://gitea.white-enciso.pro/AgileWebs/Core.Thalos.BFF/pulls/6
Reviewed-by: efrain_marin <efrain.marin@agilewebs.com>
Reviewed-by: Sergio Matías <sergio.matias@agilewebs.com>
2025-08-28 17:40:06 +00:00
Oscar Morales
3673febe93 Update the Thalos.BuildingBlocks library to retrieve the idToken instead of accessToken from google authentication 2025-08-27 23:26:04 -06:00
Sergio Matias
263bcc7649 Disable temporary authorization 2025-08-26 15:11:53 -06:00
Sergio Matias
3e935aa006 Fixed: google settings 2025-08-22 21:30:20 -06:00
Sergio Matías
ee01415ebe Merge pull request 'Add tenant property' (#5) from feature/add-tenantproperty-touser into development
Reviewed-on: https://gitea.white-enciso.pro/AgileWebs/Core.Thalos.BFF/pulls/5
Reviewed-by: OscarMmtz <oscar.morales@agilewebs.com>
2025-08-22 21:41:47 +00:00
Sergio Matias
69f0590e8d Add tenant property 2025-08-09 00:06:59 -06:00
7 changed files with 13 additions and 23 deletions

View File

@ -19,19 +19,8 @@ namespace Core.Thalos.BFF.Api.Controllers
public class AuthenticationController(
IThalosServiceClient thalosServiceClient,
ILogger<AuthenticationController> logger,
ITokenService tokenService,
IGoogleAuthorization googleAuthorization) : BaseController(logger)
ITokenService tokenService) : BaseController(logger)
{
[HttpGet]
public IActionResult Authorize() => Ok(googleAuthorization.GetAuthorizationUrl());
[HttpGet("callback")]
public async Task<IActionResult> Callback(string code)
{
var userCredential = await googleAuthorization.ExchangeCodeForToken(code);
return Ok(new { Token = userCredential!.Token.IdToken });
}
/// <summary>
/// Get token for user.
/// </summary>

View File

@ -75,6 +75,8 @@ namespace Core.Thalos.BFF.Api.Controllers
if (string.IsNullOrEmpty(newUser.RoleId)) return BadRequest("Invalid role id");
if (string.IsNullOrEmpty(newUser.TenantId)) return BadRequest("Invalid tenant id");
return await Handle(() => thalosServiceClient.CreateUserService(newUser, cancellationToken)).ConfigureAwait(false);
}
catch (Exception ex)
@ -170,8 +172,6 @@ namespace Core.Thalos.BFF.Api.Controllers
if (string.IsNullOrEmpty(request.RoleId)) return BadRequest("Invalid role id");
if (!request.Companies.Any()) return BadRequest("The user must contain at least one company");
return await Handle(() => thalosServiceClient.UpdateUserService(request, cancellationToken)).ConfigureAwait(false);
}
catch (Exception ex)

View File

@ -24,7 +24,7 @@
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7239;http://localhost:5219",
"applicationUrl": "https://localhost:44320;http://localhost:5219",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Local"
}

View File

@ -6,20 +6,20 @@
}
},
"LocalGateways": {
"ThalosService": "https://localhost:7253/api"
"ThalosService": "https://localhost:44312/api"
},
"ServiceSettings": {
"ApplicationName": "thalos",
"LayerName": "bff"
},
"Vault": {
"Address": "http://100.123.31.103:8200",
"Token": "hvs.e37LQvLuPhTd5ALS5QQ03Cwm",
"SecretMount": "secret"
"Address": "https://vault.dream-views.com/:8200",
"Token": "hvs.X11GqTbPzz4i5O4p6Mcduz7p",
"SecretMount": "thalos"
},
"IdentityProviders": {
"Google": true,
"Azure": true
"Azure": false
}
}

View File

@ -7,6 +7,7 @@
public string? MiddleName { get; set; }
public string LastName { get; set; } = null!;
public string RoleId { get; set; } = null!;
public string TenantId { get; set; } = null!;
public bool SendInvitation { get; set; }
}
}

View File

@ -10,8 +10,8 @@ namespace Core.Thalos.Application.UseCases.Users.Input
public string? MiddleName { get; set; }
public string LastName { get; set; } = null!;
public string RoleId { get; set; } = null!;
public string[] Companies { get; set; } = null!;
public string[]? Projects { get; set; }
public string TenantId { get; set; } = null!;
public StatusEnum Status { get; set; }
}
}

View File

@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Core.Thalos.BuildingBlocks" Version="1.1.2" />
<PackageReference Include="Core.Thalos.BuildingBlocks" Version="1.1.8" />
<PackageReference Include="Lib.Architecture.BuildingBlocks" Version="1.0.0" />
<PackageReference Include="Refit" Version="8.0.0" />
</ItemGroup>