Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions src/Services/id-portal/O2Bionics.Services.IdPortal.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33213.308
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "O2Bionics.Services.IdPortal", "src\O2Bionics.Services.IdPortal\O2Bionics.Services.IdPortal.csproj", "{1657073E-9EE7-43D3-A3FD-A32025E57488}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1657073E-9EE7-43D3-A3FD-A32025E57488}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1657073E-9EE7-43D3-A3FD-A32025E57488}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1657073E-9EE7-43D3-A3FD-A32025E57488}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1657073E-9EE7-43D3-A3FD-A32025E57488}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8AD066DD-B55F-49B5-8D69-6C076266C1B7}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Reflection;

namespace O2Bionics.Services.IdPortal.Controllers
{
[AllowAnonymous]
public class VersionController : ControllerBase
{
#region Fields

private readonly IWebHostEnvironment _environment;
private readonly ILogger<VersionController> _logger;

#endregion


#region Ctors

public VersionController(IWebHostEnvironment environment, ILogger<VersionController> logger)
{
_environment = environment;
_logger = logger;
}

#endregion

[HttpGet("[controller]")]
public object Index()
{
var exVersion = Assembly.GetExecutingAssembly().GetName().Version;
_logger.LogInformation($"get version - {exVersion}");
return new
{
Environment = _environment.EnvironmentName,
Version = exVersion?.ToString()
};
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
</ItemGroup>

</Project>
30 changes: 30 additions & 0 deletions src/Services/id-portal/src/O2Bionics.Services.IdPortal/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
var builder = WebApplication.CreateBuilder(args);
var configuration = builder.Configuration;
var environment = builder.Environment;

// Add services to the container.
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

var app = builder.Build();
app.UseSwagger();
app.UseSwaggerUI();
app.Use(async (context, next) =>
{
context.Response.OnStarting(() =>
{
context.Response.Headers.Add("X-Powered-By", "O2NextGen Platform");
return Task.CompletedTask;
});

await next.Invoke();
});
app.UseRouting();
app.UseHttpsRedirection();

app.UseAuthorization();

app.MapControllers();

app.Run();
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:16044",
"sslPort": 0
}
},
"profiles": {
"O2Bionics.Services.IdPortal": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5160",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version": "1.0",
"defaultProvider": "cdnjs",
"libraries": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace PFRCentr.App.MvcClient.Controllers;

// [Authorize]
public class CategoryController:Controller
{
private readonly ICGenCategoryService _icGenCategoryService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
}
},
"Services": {
// "CallBackUrl":"https://localhost:5003",
// "AuthApiUrl": "https://localhost:5000",
"CGenApiUrl":"https://localhost:11001"
"CallBackUrl":"https://localhost:5003",
"AuthApiUrl": "https://auth.o2nextgen.com",
"CGenApiUrl":"https://cgen-api.o2nextgen.com"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
"AllowedHosts": "*",
"Services": {
"CallBackUrl":"https://localhost:5003",
"AuthApiUrl": "https://localhost:5000",
"CGenApiUrl":"https://localhost:11001"
"AuthApiUrl": "https://auth.o2nextgen.com",
"CGenApiUrl":"https://cgen-api.o2nextgen.com"
// "CallBackUrl":"https://localhost:5003",
// "AuthApiUrl": "https://localhost:5000",
// "CGenApiUrl":"https://localhost:11001"
}
}