Compare commits
6 Commits
feature/us
...
feature/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33c0cd2642 | ||
| 8ac0eb0bf0 | |||
| 8d954c9a09 | |||
| f82ebb5e69 | |||
|
|
44ccda0736 | ||
| fd31d5dd00 |
@@ -4,6 +4,7 @@
|
|||||||
// </copyright>
|
// </copyright>
|
||||||
// ***********************************************************************
|
// ***********************************************************************
|
||||||
|
|
||||||
|
using Core.Blueprint.Mongo;
|
||||||
using Core.Thalos.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;
|
||||||
@@ -14,17 +15,9 @@ namespace Core.Thalos.Adapters
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adapter for representing a module.
|
/// Adapter for representing a module.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[CollectionAttributeName("Modules")]
|
||||||
public class ModuleAdapter : Document
|
public class ModuleAdapter : Document
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the ID of the module.
|
|
||||||
/// </summary>
|
|
||||||
[BsonId]
|
|
||||||
[BsonElement("_id")]
|
|
||||||
[BsonRepresentation(BsonType.ObjectId)]
|
|
||||||
[JsonPropertyName("id")]
|
|
||||||
public string Id { get; set; } = null!;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name of the module.
|
/// Gets or sets the name of the module.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
// </copyright>
|
// </copyright>
|
||||||
// ***********************************************************************
|
// ***********************************************************************
|
||||||
|
|
||||||
|
using Core.Blueprint.Mongo;
|
||||||
using Core.Thalos.Adapters.Common.Constants;
|
using Core.Thalos.Adapters.Common.Constants;
|
||||||
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;
|
||||||
@@ -15,17 +15,9 @@ namespace Core.Thalos.Adapters
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adapter for representing a permission.
|
/// Adapter for representing a permission.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[CollectionAttributeName("Permissions")]
|
||||||
public class PermissionAdapter : Document
|
public class PermissionAdapter : Document
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the ID of the entity.
|
|
||||||
/// </summary>
|
|
||||||
[BsonId]
|
|
||||||
[BsonElement("_id")]
|
|
||||||
[BsonRepresentation(BsonType.ObjectId)]
|
|
||||||
[JsonPropertyName("id")]
|
|
||||||
public string Id { get; set; } = null!;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name of the entity.
|
/// Gets or sets the name of the entity.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
// </copyright>
|
// </copyright>
|
||||||
// ***********************************************************************
|
// ***********************************************************************
|
||||||
|
|
||||||
|
using Core.Blueprint.Mongo;
|
||||||
using Core.Thalos.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;
|
||||||
@@ -14,17 +15,9 @@ namespace Core.Thalos.Adapters
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adapter representing a role.
|
/// Adapter representing a role.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[CollectionAttributeName("Roles")]
|
||||||
public class RoleAdapter : Document
|
public class RoleAdapter : Document
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the unique identifier of the role.
|
|
||||||
/// </summary>
|
|
||||||
[BsonId]
|
|
||||||
[BsonElement("_id")]
|
|
||||||
[BsonRepresentation(BsonType.ObjectId)]
|
|
||||||
[JsonPropertyName("id")]
|
|
||||||
public string Id { get; set; } = null!;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name of the role.
|
/// Gets or sets the name of the role.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// AgileWebs
|
// AgileWebs
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// ***********************************************************************
|
// ***********************************************************************
|
||||||
using Core.Thalos.Adapters.Common.Enums;
|
using Core.Blueprint.Mongo;
|
||||||
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;
|
||||||
@@ -13,17 +13,9 @@ namespace Core.Thalos.Adapters
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adapter representing a user.
|
/// Adapter representing a user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[CollectionAttributeName("Users")]
|
||||||
public class UserAdapter : Document
|
public class UserAdapter : Document
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the unique identifier of the user.
|
|
||||||
/// </summary>
|
|
||||||
[BsonId]
|
|
||||||
[BsonElement("_id")]
|
|
||||||
[BsonRepresentation(BsonType.ObjectId)]
|
|
||||||
[JsonPropertyName("id")]
|
|
||||||
public string Id { get; set; } = null!;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the guid of the user.
|
/// Gets or sets the guid of the user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ namespace Core.Thalos.Adapters.Common.Constants
|
|||||||
public const string ThalosAppTokenUrl = "Swagger:TokenUri";
|
public const string ThalosAppTokenUrl = "Swagger:TokenUri";
|
||||||
public const string ThalosAppClientId = "Swagger:ClientId";
|
public const string ThalosAppClientId = "Swagger:ClientId";
|
||||||
public const string ThalosAppScope = "Swagger:Scope";
|
public const string ThalosAppScope = "Swagger:Scope";
|
||||||
public const string PrivateKey = "B2C:JwtIssuerOptions:TokenPrivateKey";
|
public const string PrivateKey = "JwtTokenPrivateKey";
|
||||||
public const string PublicKey = "B2C:JwtIssuerOptions:TokenPublicKey";
|
public const string PublicKey = "JwtTokenPublicKey";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,28 +15,13 @@ namespace Core.Thalos.Adapters.Common.Enums
|
|||||||
public enum ApplicationsEnum
|
public enum ApplicationsEnum
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// LSA Web Portal application.
|
/// Thalos application.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
LSAWebPortal = 0,
|
Thalos = 0,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Customer DashBoard application.
|
/// DreamViewer application.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
CustomerDashboard = 1,
|
DreamViewer = 1,
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Discover application.
|
|
||||||
/// </summary>
|
|
||||||
Discover = 2,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// LSA Mobile application.
|
|
||||||
/// </summary>
|
|
||||||
LSAMobile = 3,
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// BluePrint application.
|
|
||||||
/// </summary>
|
|
||||||
BluePrint = 4,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,11 +8,13 @@
|
|||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
<VersionPrefix>1.0.2</VersionPrefix>
|
||||||
|
<VersionSuffix>$(Date:yyyyMMddHHmm)</VersionSuffix>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="8.1.0" />
|
<PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="8.1.0" />
|
||||||
<PackageReference Include="Blueprint.Mongo" Version="0.0.3" />
|
<PackageReference Include="Core.Blueprint.Mongo" Version="1.0.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.2.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.AzureAppConfiguration" Version="8.2.0" />
|
||||||
<PackageReference Include="Microsoft.Identity.Web" Version="3.9.1" />
|
<PackageReference Include="Microsoft.Identity.Web" Version="3.9.1" />
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ namespace Core.Thalos.Adapters.Helpers
|
|||||||
|
|
||||||
|
|
||||||
public static AuthSettings GetAuthSettings(WebApplicationBuilder builder, string appConfigLabel)
|
public static AuthSettings GetAuthSettings(WebApplicationBuilder builder, string appConfigLabel)
|
||||||
|
{
|
||||||
|
var environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? string.Empty;
|
||||||
|
|
||||||
|
if (environment != "Local")
|
||||||
{
|
{
|
||||||
builder.Configuration.AddAzureAppConfiguration(options =>
|
builder.Configuration.AddAzureAppConfiguration(options =>
|
||||||
{
|
{
|
||||||
@@ -33,6 +37,7 @@ namespace Core.Thalos.Adapters.Helpers
|
|||||||
keyVaultOptions.SetCredential(new DefaultAzureCredential());
|
keyVaultOptions.SetCredential(new DefaultAzureCredential());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return new AuthSettings
|
return new AuthSettings
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user