reeplace cerberos by thalos
This commit is contained in:
		| @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 | |||||||
| # Visual Studio Version 17 | # Visual Studio Version 17 | ||||||
| VisualStudioVersion = 17.10.34928.147 | VisualStudioVersion = 17.10.34928.147 | ||||||
| MinimumVisualStudioVersion = 10.0.40219.1 | MinimumVisualStudioVersion = 10.0.40219.1 | ||||||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core.Cerberos.Adapters", "Core.Cerberos.Adapters\Core.Cerberos.Adapters.csproj", "{C902AB37-E6D1-4CE7-B271-0E3969C989F3}" | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core.Thalos.BuildingBlocks", "Core.Thalos.BuildingBlocks\Core.Thalos.BuildingBlocks.csproj", "{C902AB37-E6D1-4CE7-B271-0E3969C989F3}" | ||||||
| EndProject | EndProject | ||||||
| Global | Global | ||||||
| 	GlobalSection(SolutionConfigurationPlatforms) = preSolution | 	GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||||||
| @@ -5,7 +5,7 @@ using System.Text; | |||||||
| using System.Text.Json; | using System.Text.Json; | ||||||
| using System.Threading.Tasks; | using System.Threading.Tasks; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters | namespace Core.Thalos.Adapters | ||||||
| { | { | ||||||
|     public class BaseAdapterResponse |     public class BaseAdapterResponse | ||||||
|     { |     { | ||||||
| @@ -4,12 +4,12 @@ | |||||||
| // </copyright> | // </copyright> | ||||||
| // *********************************************************************** | // *********************************************************************** | ||||||
| 
 | 
 | ||||||
| using Core.Cerberos.Adapters.Common.Enums; | using Core.Thalos.Adapters.Common.Enums; | ||||||
| using MongoDB.Bson; | using MongoDB.Bson; | ||||||
| using MongoDB.Bson.Serialization.Attributes; | using MongoDB.Bson.Serialization.Attributes; | ||||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters | namespace Core.Thalos.Adapters | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Adapter for representing a module. |     /// Adapter for representing a module. | ||||||
| @@ -4,13 +4,13 @@ | |||||||
| // </copyright> | // </copyright> | ||||||
| // *********************************************************************** | // *********************************************************************** | ||||||
| 
 | 
 | ||||||
| using Core.Cerberos.Adapters.Common.Constants; | using Core.Thalos.Adapters.Common.Constants; | ||||||
| using Core.Cerberos.Adapters.Common.Enums; | using Core.Thalos.Adapters.Common.Enums; | ||||||
| using MongoDB.Bson; | using MongoDB.Bson; | ||||||
| using MongoDB.Bson.Serialization.Attributes; | using MongoDB.Bson.Serialization.Attributes; | ||||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters | namespace Core.Thalos.Adapters | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Adapter for representing a permission. |     /// Adapter for representing a permission. | ||||||
| @@ -4,12 +4,12 @@ | |||||||
| // </copyright> | // </copyright> | ||||||
| // *********************************************************************** | // *********************************************************************** | ||||||
| 
 | 
 | ||||||
| using Core.Cerberos.Adapters.Common.Enums; | using Core.Thalos.Adapters.Common.Enums; | ||||||
| using MongoDB.Bson; | using MongoDB.Bson; | ||||||
| using MongoDB.Bson.Serialization.Attributes; | using MongoDB.Bson.Serialization.Attributes; | ||||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters | namespace Core.Thalos.Adapters | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Adapter representing a role. |     /// Adapter representing a role. | ||||||
| @@ -4,7 +4,7 @@ | |||||||
| // </copyright> | // </copyright> | ||||||
| // *********************************************************************** | // *********************************************************************** | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters | namespace Core.Thalos.Adapters | ||||||
| { | { | ||||||
|     public class TokenAdapter |     public class TokenAdapter | ||||||
|     { |     { | ||||||
| @@ -3,12 +3,12 @@ | |||||||
| //     AgileWebs | //     AgileWebs | ||||||
| // </copyright> | // </copyright> | ||||||
| // *********************************************************************** | // *********************************************************************** | ||||||
| using Core.Cerberos.Adapters.Common.Enums; | using Core.Thalos.Adapters.Common.Enums; | ||||||
| using MongoDB.Bson; | using MongoDB.Bson; | ||||||
| using MongoDB.Bson.Serialization.Attributes; | using MongoDB.Bson.Serialization.Attributes; | ||||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters | namespace Core.Thalos.Adapters | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Adapter representing a user. |     /// Adapter representing a user. | ||||||
| @@ -1,4 +1,4 @@ | |||||||
| namespace Core.Cerberos.Adapters | namespace Core.Thalos.Adapters | ||||||
| { | { | ||||||
|     public class Permission |     public class Permission | ||||||
|     { |     { | ||||||
| @@ -2,7 +2,7 @@ | |||||||
| using Microsoft.AspNetCore.Mvc; | using Microsoft.AspNetCore.Mvc; | ||||||
| using Microsoft.AspNetCore.Mvc.Filters; | using Microsoft.AspNetCore.Mvc.Filters; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Attributes | namespace Core.Thalos.Adapters.Attributes | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Custom authorization attribute that checks if the user has any of the required permissions. |     /// Custom authorization attribute that checks if the user has any of the required permissions. | ||||||
| @@ -6,7 +6,7 @@ | |||||||
| 
 | 
 | ||||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Common.Constants | namespace Core.Thalos.Adapters.Common.Constants | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Specifies different access level for a permission. |     /// Specifies different access level for a permission. | ||||||
| @@ -3,7 +3,7 @@ | |||||||
| //     AgileWebs | //     AgileWebs | ||||||
| // </copyright> | // </copyright> | ||||||
| // *********************************************************************** | // *********************************************************************** | ||||||
| namespace Core.Cerberos.Adapters.Common.Constants | namespace Core.Thalos.Adapters.Common.Constants | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Constants for Azure Active Directory. |     /// Constants for Azure Active Directory. | ||||||
| @@ -3,7 +3,7 @@ | |||||||
| //     AgileWebs | //     AgileWebs | ||||||
| // </copyright> | // </copyright> | ||||||
| // *********************************************************************** | // *********************************************************************** | ||||||
| namespace Core.Cerberos.Adapters.Common.Constants | namespace Core.Thalos.Adapters.Common.Constants | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Constants for claims used in JWT tokens. |     /// Constants for claims used in JWT tokens. | ||||||
| @@ -1,4 +1,4 @@ | |||||||
| namespace Core.Cerberos.Adapters.Common.Constants | namespace Core.Thalos.Adapters.Common.Constants | ||||||
| { | { | ||||||
|     public static class CollectionNames |     public static class CollectionNames | ||||||
|     { |     { | ||||||
| @@ -4,7 +4,7 @@ | |||||||
| // </copyright> | // </copyright> | ||||||
| // *********************************************************************** | // *********************************************************************** | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Common.Constants | namespace Core.Thalos.Adapters.Common.Constants | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Constants of the environment variables for this service. |     /// Constants of the environment variables for this service. | ||||||
| @@ -3,7 +3,7 @@ | |||||||
| //     AgileWebs | //     AgileWebs | ||||||
| // </copyright> | // </copyright> | ||||||
| // *********************************************************************** | // *********************************************************************** | ||||||
| namespace Core.Cerberos.Adapters.Common.Constants | namespace Core.Thalos.Adapters.Common.Constants | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Constants for Key Vault configuration. |     /// Constants for Key Vault configuration. | ||||||
| @@ -6,7 +6,7 @@ | |||||||
| 
 | 
 | ||||||
| using System.Globalization; | using System.Globalization; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Common.Constants | namespace Core.Thalos.Adapters.Common.Constants | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Constants for the mime types. |     /// Constants for the mime types. | ||||||
| @@ -4,7 +4,7 @@ | |||||||
| // </copyright> | // </copyright> | ||||||
| // *********************************************************************** | // *********************************************************************** | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Common.Constants | namespace Core.Thalos.Adapters.Common.Constants | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Constants of the routes of this service. |     /// Constants of the routes of this service. | ||||||
| @@ -1,4 +1,4 @@ | |||||||
| namespace Core.Cerberos.Adapters.Common.Constants | namespace Core.Thalos.Adapters.Common.Constants | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Constants for schemes. |     /// Constants for schemes. | ||||||
| @@ -3,7 +3,7 @@ | |||||||
| //     AgileWebs | //     AgileWebs | ||||||
| // </copyright> | // </copyright> | ||||||
| // *********************************************************************** | // *********************************************************************** | ||||||
| namespace Core.Cerberos.Adapters.Common.Constants | namespace Core.Thalos.Adapters.Common.Constants | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Constants for secrets in azure key vault. |     /// Constants for secrets in azure key vault. | ||||||
| @@ -49,10 +49,10 @@ namespace Core.Cerberos.Adapters.Common.Constants | |||||||
|         public const string AzureADTenantId = "B2C:TenantId"; |         public const string AzureADTenantId = "B2C:TenantId"; | ||||||
|         public const string AzureADClientId = "B2C:ClientId"; |         public const string AzureADClientId = "B2C:ClientId"; | ||||||
|         public const string AzureADClientSecret = "B2C:ClientSecret"; |         public const string AzureADClientSecret = "B2C:ClientSecret"; | ||||||
|         public const string HeathCerberosAppAuthorizationUrl = "Swagger:AuthorizationUri"; |         public const string HeathThalosAppAuthorizationUrl = "Swagger:AuthorizationUri"; | ||||||
|         public const string HeathCerberosAppTokenUrl = "Swagger:TokenUri"; |         public const string HeathThalosAppTokenUrl = "Swagger:TokenUri"; | ||||||
|         public const string HeathCerberosAppClientId = "Swagger:ClientId"; |         public const string HeathThalosAppClientId = "Swagger:ClientId"; | ||||||
|         public const string HeathCerberosAppScope = "Swagger:Scope"; |         public const string HeathThalosAppScope = "Swagger:Scope"; | ||||||
|         public const string PrivateKey = "B2C:JwtIssuerOptions:TokenPrivateKey"; |         public const string PrivateKey = "B2C:JwtIssuerOptions:TokenPrivateKey"; | ||||||
|         public const string PublicKey = "B2C:JwtIssuerOptions:TokenPublicKey"; |         public const string PublicKey = "B2C:JwtIssuerOptions:TokenPublicKey"; | ||||||
|     } |     } | ||||||
| @@ -6,7 +6,7 @@ | |||||||
| 
 | 
 | ||||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Common.Enums | namespace Core.Thalos.Adapters.Common.Enums | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Defines the applications associated with the role. |     /// Defines the applications associated with the role. | ||||||
| @@ -6,7 +6,7 @@ | |||||||
| 
 | 
 | ||||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Common.Enums | namespace Core.Thalos.Adapters.Common.Enums | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Defines the status of an entity. |     /// Defines the status of an entity. | ||||||
| @@ -4,7 +4,7 @@ | |||||||
| // </copyright> | // </copyright> | ||||||
| // *********************************************************************** | // *********************************************************************** | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Contracts | namespace Core.Thalos.Adapters.Contracts | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Interface for token provider. |     /// Interface for token provider. | ||||||
| @@ -7,7 +7,7 @@ | |||||||
| using Microsoft.AspNetCore.Http; | using Microsoft.AspNetCore.Http; | ||||||
| using Microsoft.AspNetCore.Mvc; | using Microsoft.AspNetCore.Mvc; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Contracts | namespace Core.Thalos.Adapters.Contracts | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Interface for authenticacion service. |     /// Interface for authenticacion service. | ||||||
| @@ -13,18 +13,18 @@ | |||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="8.1.0" /> |     <PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="8.1.0" /> | ||||||
|     <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.10" /> |     <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.10" /> | ||||||
|     <PackageReference Include="Microsoft.Extensions.Configuration.AzureAppConfiguration" Version="8.0.0" /> |     <PackageReference Include="Microsoft.Extensions.Configuration.AzureAppConfiguration" Version="8.2.0" /> | ||||||
|     <PackageReference Include="Microsoft.Identity.Web" Version="3.2.2" /> |     <PackageReference Include="Microsoft.Identity.Web" Version="3.9.1" /> | ||||||
|     <PackageReference Include="Microsoft.Identity.Web.MicrosoftGraph" Version="3.2.2" /> |     <PackageReference Include="Microsoft.Identity.Web.MicrosoftGraph" Version="3.9.1" /> | ||||||
|     <PackageReference Include="MongoDB.Bson" Version="3.0.0" /> |     <PackageReference Include="MongoDB.Bson" Version="3.4.0" /> | ||||||
|     <PackageReference Include="OpenTelemetry" Version="1.9.0" /> |     <PackageReference Include="OpenTelemetry" Version="1.12.0" /> | ||||||
|     <PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.9.0" /> |     <PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.12.0" /> | ||||||
|     <PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.9.0" /> |     <PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.12.0" /> | ||||||
|     <PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.9.0" /> |     <PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.12.0" /> | ||||||
|     <PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.9.0" /> |     <PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.12.0" /> | ||||||
|     <PackageReference Include="Portable.BouncyCastle" Version="1.9.0" /> |     <PackageReference Include="Portable.BouncyCastle" Version="1.9.0" /> | ||||||
|     <PackageReference Include="Swashbuckle.AspNetCore" Version="6.9.0" /> |     <PackageReference Include="Swashbuckle.AspNetCore" Version="8.1.1" /> | ||||||
|     <PackageReference Include="System.Text.Json" Version="8.0.5" /> |     <PackageReference Include="System.Text.Json" Version="9.0.5" /> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
| 
 | 
 | ||||||
| </Project> | </Project> | ||||||
| @@ -4,11 +4,11 @@ | |||||||
| // </copyright> | // </copyright> | ||||||
| // *********************************************************************** | // *********************************************************************** | ||||||
| 
 | 
 | ||||||
| using Core.Cerberos.Adapters.Common.Constants; | using Core.Thalos.Adapters.Common.Constants; | ||||||
| using Core.Cerberos.Adapters.Contracts; | using Core.Thalos.Adapters.Contracts; | ||||||
| using Core.Cerberos.Adapters.Handlers; | using Core.Thalos.Adapters.Handlers; | ||||||
| using Core.Cerberos.Adapters.Options; | using Core.Thalos.Adapters.Options; | ||||||
| using Core.Cerberos.Adapters.Services; | using Core.Thalos.Adapters.Services; | ||||||
| using Microsoft.AspNetCore.Authentication.JwtBearer; | using Microsoft.AspNetCore.Authentication.JwtBearer; | ||||||
| using Microsoft.AspNetCore.Authorization; | using Microsoft.AspNetCore.Authorization; | ||||||
| using Microsoft.Extensions.Configuration; | using Microsoft.Extensions.Configuration; | ||||||
| @@ -17,7 +17,7 @@ using Microsoft.Identity.Web; | |||||||
| using Microsoft.IdentityModel.Tokens; | using Microsoft.IdentityModel.Tokens; | ||||||
| using System.Security.Cryptography; | using System.Security.Cryptography; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Extensions | namespace Core.Thalos.Adapters.Extensions | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Extension methods for configuring authentication with various Azure AD setups. |     /// Extension methods for configuring authentication with various Azure AD setups. | ||||||
| @@ -5,8 +5,8 @@ | |||||||
| // *********************************************************************** | // *********************************************************************** | ||||||
| 
 | 
 | ||||||
| using Asp.Versioning.ApiExplorer; | using Asp.Versioning.ApiExplorer; | ||||||
| using Core.Cerberos.Adapters.Common.Constants; | using Core.Thalos.Adapters.Common.Constants; | ||||||
| using Core.Cerberos.Adapters.Extensions; | using Core.Thalos.Adapters.Extensions; | ||||||
| using Microsoft.AspNetCore.Builder; | using Microsoft.AspNetCore.Builder; | ||||||
| using Microsoft.Extensions.Configuration; | using Microsoft.Extensions.Configuration; | ||||||
| using Microsoft.Extensions.DependencyInjection; | using Microsoft.Extensions.DependencyInjection; | ||||||
| @@ -16,7 +16,7 @@ using Microsoft.OpenApi.Models; | |||||||
| using Swashbuckle.AspNetCore.SwaggerGen; | using Swashbuckle.AspNetCore.SwaggerGen; | ||||||
| using Swashbuckle.AspNetCore.SwaggerUI; | using Swashbuckle.AspNetCore.SwaggerUI; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Extensions | namespace Core.Thalos.Adapters.Extensions | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Extension methods for configuring Swagger documentation and UI. |     /// Extension methods for configuring Swagger documentation and UI. | ||||||
| @@ -53,11 +53,11 @@ namespace Core.Cerberos.Adapters.Extensions | |||||||
|                         { |                         { | ||||||
|                             AuthorizationCode = new OpenApiOAuthFlow |                             AuthorizationCode = new OpenApiOAuthFlow | ||||||
|                             { |                             { | ||||||
|                                 AuthorizationUrl = new Uri(authSettings.HeathCerberosAppAuthorizationUrl ?? string.Empty), |                                 AuthorizationUrl = new Uri(authSettings.HeathThalosAppAuthorizationUrl ?? string.Empty), | ||||||
|                                 TokenUrl = new Uri(authSettings.HeathCerberosAppTokenUrl ?? string.Empty), |                                 TokenUrl = new Uri(authSettings.HeathThalosAppTokenUrl ?? string.Empty), | ||||||
|                                 Scopes = new Dictionary<string, string> |                                 Scopes = new Dictionary<string, string> | ||||||
|                                 { |                                 { | ||||||
|                                 { authSettings.HeathCerberosAppScope ?? string.Empty, "Access API as User" } |                                 { authSettings.HeathThalosAppScope ?? string.Empty, "Access API as User" } | ||||||
|                                 } |                                 } | ||||||
|                             } |                             } | ||||||
|                         } |                         } | ||||||
| @@ -70,7 +70,7 @@ namespace Core.Cerberos.Adapters.Extensions | |||||||
|                         { |                         { | ||||||
|                             Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "oauth2" } |                             Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "oauth2" } | ||||||
|                         }, |                         }, | ||||||
|                         new[] { authSettings.HeathCerberosAppScope } |                         new[] { authSettings.HeathThalosAppScope } | ||||||
|                     } |                     } | ||||||
|                     }); |                     }); | ||||||
| 
 | 
 | ||||||
| @@ -134,7 +134,7 @@ namespace Core.Cerberos.Adapters.Extensions | |||||||
|             app.UseSwaggerUI(options => |             app.UseSwaggerUI(options => | ||||||
|             { |             { | ||||||
|                 options.SwaggerEndpoint("/swagger/v1/swagger.json", "Custom Auth API with Azure AD v1"); |                 options.SwaggerEndpoint("/swagger/v1/swagger.json", "Custom Auth API with Azure AD v1"); | ||||||
|                 options.OAuthClientId(authSettings.HeathCerberosAppClientId); |                 options.OAuthClientId(authSettings.HeathThalosAppClientId); | ||||||
|                 options.OAuthUsePkce(); |                 options.OAuthUsePkce(); | ||||||
|                 options.OAuthScopeSeparator(" "); |                 options.OAuthScopeSeparator(" "); | ||||||
|             }); |             }); | ||||||
| @@ -4,7 +4,7 @@ using OpenTelemetry.Metrics; | |||||||
| using OpenTelemetry.Resources; | using OpenTelemetry.Resources; | ||||||
| using OpenTelemetry.Trace; | using OpenTelemetry.Trace; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Extensions | namespace Core.Thalos.Adapters.Extensions | ||||||
| { | { | ||||||
|     public static class TelemetryExtensions |     public static class TelemetryExtensions | ||||||
|     { |     { | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| using Microsoft.AspNetCore.Http; | using Microsoft.AspNetCore.Http; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Extensions | namespace Core.Thalos.Adapters.Extensions | ||||||
| { | { | ||||||
|     public sealed class TrackingMechanismExtension : DelegatingHandler |     public sealed class TrackingMechanismExtension : DelegatingHandler | ||||||
|     { |     { | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| using Microsoft.AspNetCore.Authorization; | using Microsoft.AspNetCore.Authorization; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Handlers.Adapters | namespace Core.Thalos.Adapters.Handlers.Adapters | ||||||
| { | { | ||||||
|     public class PermissionsAuthorizationAdapter : IAuthorizationRequirement |     public class PermissionsAuthorizationAdapter : IAuthorizationRequirement | ||||||
|     { |     { | ||||||
| @@ -4,9 +4,9 @@ | |||||||
| // </copyright> | // </copyright> | ||||||
| // *********************************************************************** | // *********************************************************************** | ||||||
| 
 | 
 | ||||||
| using Core.Cerberos.Adapters.Contracts; | using Core.Thalos.Adapters.Contracts; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Handlers | namespace Core.Thalos.Adapters.Handlers | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Class to inject the token in all requests. |     /// Class to inject the token in all requests. | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| using Core.Cerberos.Adapters.Handlers.Adapters; | using Core.Thalos.Adapters.Handlers.Adapters; | ||||||
| using Microsoft.AspNetCore.Authorization; | using Microsoft.AspNetCore.Authorization; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Handlers | namespace Core.Thalos.Adapters.Handlers | ||||||
| { | { | ||||||
|     public class PermissionsAuthorizationHandler : AuthorizationHandler<PermissionsAuthorizationAdapter> |     public class PermissionsAuthorizationHandler : AuthorizationHandler<PermissionsAuthorizationAdapter> | ||||||
|     { |     { | ||||||
| @@ -1,11 +1,11 @@ | |||||||
| using Azure.Identity; | using Azure.Identity; | ||||||
| using Core.Cerberos.Adapters.Common.Constants; | using Core.Thalos.Adapters.Common.Constants; | ||||||
| using Microsoft.AspNetCore.Builder; | using Microsoft.AspNetCore.Builder; | ||||||
| using Microsoft.Extensions.Configuration; | using Microsoft.Extensions.Configuration; | ||||||
| using Microsoft.Extensions.Configuration.AzureAppConfiguration; | using Microsoft.Extensions.Configuration.AzureAppConfiguration; | ||||||
| using Microsoft.Extensions.Logging; | using Microsoft.Extensions.Logging; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Helpers | namespace Core.Thalos.Adapters.Helpers | ||||||
| { | { | ||||||
|     public static class AuthHelper |     public static class AuthHelper | ||||||
|     { |     { | ||||||
| @@ -40,10 +40,10 @@ namespace Core.Cerberos.Adapters.Helpers | |||||||
|                 AzureADTenantId = builder.Configuration.GetSection(Secrets.AzureADTenantId).Value, |                 AzureADTenantId = builder.Configuration.GetSection(Secrets.AzureADTenantId).Value, | ||||||
|                 AzureADClientId = builder.Configuration.GetSection(Secrets.AzureADClientId).Value, |                 AzureADClientId = builder.Configuration.GetSection(Secrets.AzureADClientId).Value, | ||||||
|                 AzureADClientSecret = builder.Configuration.GetSection(Secrets.AzureADClientSecret).Value, |                 AzureADClientSecret = builder.Configuration.GetSection(Secrets.AzureADClientSecret).Value, | ||||||
|                 HeathCerberosAppAuthorizationUrl = builder.Configuration.GetSection(Secrets.HeathCerberosAppAuthorizationUrl).Value, |                 HeathThalosAppAuthorizationUrl = builder.Configuration.GetSection(Secrets.HeathThalosAppAuthorizationUrl).Value, | ||||||
|                 HeathCerberosAppTokenUrl = builder.Configuration.GetSection(Secrets.HeathCerberosAppTokenUrl).Value, |                 HeathThalosAppTokenUrl = builder.Configuration.GetSection(Secrets.HeathThalosAppTokenUrl).Value, | ||||||
|                 HeathCerberosAppClientId = builder.Configuration.GetSection(Secrets.HeathCerberosAppClientId).Value, |                 HeathThalosAppClientId = builder.Configuration.GetSection(Secrets.HeathThalosAppClientId).Value, | ||||||
|                 HeathCerberosAppScope = builder.Configuration.GetSection(Secrets.HeathCerberosAppScope).Value, |                 HeathThalosAppScope = builder.Configuration.GetSection(Secrets.HeathThalosAppScope).Value, | ||||||
|                 PrivateKey = builder.Configuration.GetSection(Secrets.PrivateKey).Value, |                 PrivateKey = builder.Configuration.GetSection(Secrets.PrivateKey).Value, | ||||||
|                 PublicKey = builder.Configuration.GetSection(Secrets.PublicKey).Value, |                 PublicKey = builder.Configuration.GetSection(Secrets.PublicKey).Value, | ||||||
|             }; |             }; | ||||||
| @@ -10,7 +10,7 @@ using Org.BouncyCastle.Security; | |||||||
| using System.Security.Cryptography; | using System.Security.Cryptography; | ||||||
| using System.Text; | using System.Text; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Helpers | namespace Core.Thalos.Adapters.Helpers | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Handles all methods related to RSA encryption"/>. |     /// Handles all methods related to RSA encryption"/>. | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| using Microsoft.IdentityModel.Tokens; | using Microsoft.IdentityModel.Tokens; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Options | namespace Core.Thalos.Adapters.Options | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// JWT token Issuer options (used for JWT Factory) |     /// JWT token Issuer options (used for JWT Factory) | ||||||
| @@ -1,11 +1,11 @@ | |||||||
| // *********************************************************************** | // *********************************************************************** | ||||||
| // <copyright file="T5okenService.cs"> | // <copyright file="TokenService.cs"> | ||||||
| //     AgileWebs | //     AgileWebs | ||||||
| // </copyright> | // </copyright> | ||||||
| // *********************************************************************** | // *********************************************************************** | ||||||
| using Core.Cerberos.Adapters.Common.Constants; | using Core.Thalos.Adapters.Common.Constants; | ||||||
| using Core.Cerberos.Adapters.Contracts; | using Core.Thalos.Adapters.Contracts; | ||||||
| using Core.Cerberos.Adapters.Options; | using Core.Thalos.Adapters.Options; | ||||||
| using Microsoft.AspNetCore.Http; | using Microsoft.AspNetCore.Http; | ||||||
| using Microsoft.AspNetCore.Mvc; | using Microsoft.AspNetCore.Mvc; | ||||||
| using Microsoft.Extensions.Configuration; | using Microsoft.Extensions.Configuration; | ||||||
| @@ -16,7 +16,7 @@ using System.IdentityModel.Tokens.Jwt; | |||||||
| using System.Security.Claims; | using System.Security.Claims; | ||||||
| using System.Text.Json; | using System.Text.Json; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.Services | namespace Core.Thalos.Adapters.Services | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Service responsible for manage authenticacion. |     /// Service responsible for manage authenticacion. | ||||||
| @@ -12,11 +12,11 @@ public class AuthSettings | |||||||
|     public string? AzureADClientId { get; set; } |     public string? AzureADClientId { get; set; } | ||||||
|     public string? AzureADClientSecret { get; set; } |     public string? AzureADClientSecret { get; set; } | ||||||
| 
 | 
 | ||||||
|     // Heath Cerberos App Settings |     // Heath Thalos App Settings | ||||||
|     public string? HeathCerberosAppAuthorizationUrl { get; set; } |     public string? HeathThalosAppAuthorizationUrl { get; set; } | ||||||
|     public string? HeathCerberosAppTokenUrl { get; set; } |     public string? HeathThalosAppTokenUrl { get; set; } | ||||||
|     public string? HeathCerberosAppClientId { get; set; } |     public string? HeathThalosAppClientId { get; set; } | ||||||
|     public string? HeathCerberosAppScope { get; set; } |     public string? HeathThalosAppScope { get; set; } | ||||||
| 
 | 
 | ||||||
|     // Token Keys |     // Token Keys | ||||||
|     public string? PrivateKey { get; set; } |     public string? PrivateKey { get; set; } | ||||||
| @@ -4,10 +4,10 @@ | |||||||
| // </copyright> | // </copyright> | ||||||
| // *********************************************************************** | // *********************************************************************** | ||||||
| 
 | 
 | ||||||
| using Core.Cerberos.Adapters.Contracts; | using Core.Thalos.Adapters.Contracts; | ||||||
| using Microsoft.AspNetCore.Http; | using Microsoft.AspNetCore.Http; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters.TokenProvider | namespace Core.Thalos.Adapters.TokenProvider | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Class to return the access token to controllers. |     /// Class to return the access token to controllers. | ||||||
| @@ -6,7 +6,7 @@ | |||||||
| 
 | 
 | ||||||
| using System.Text.Json.Serialization; | using System.Text.Json.Serialization; | ||||||
| 
 | 
 | ||||||
| namespace Core.Cerberos.Adapters | namespace Core.Thalos.Adapters | ||||||
| { | { | ||||||
|     /// <summary> |     /// <summary> | ||||||
|     /// Adapter representing a user. |     /// Adapter representing a user. | ||||||
		Reference in New Issue
	
	Block a user
	 Sergio Matias Urquin
					Sergio Matias Urquin