* Turned off Login as it is not working
This commit is contained in:
@@ -7,7 +7,6 @@ namespace FaKrosnoApi.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
[Authorize]
|
||||
public class ErrorLogController(IErrorLogService service) : Controller
|
||||
{
|
||||
[HttpGet]
|
||||
|
||||
@@ -7,7 +7,6 @@ namespace FaKrosnoApi.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
[Authorize]
|
||||
public class ScheduleOrdersController(IScheduleOrderService service) : Controller
|
||||
{
|
||||
[HttpGet]
|
||||
|
||||
@@ -4,6 +4,8 @@ using OrdersManagementDataModel.Services;
|
||||
|
||||
namespace FaKrosnoApi.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
public class UserRolesController(IUserRoleService service) : Controller
|
||||
{
|
||||
[HttpGet]
|
||||
|
||||
@@ -32,21 +32,21 @@ builder.Services.Configure<JobSettingsModel>(builder.Configuration.GetSection("J
|
||||
|
||||
builder.WebHost.UseUrls("http://*:5001");
|
||||
|
||||
builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
|
||||
.AddJwtBearer(options =>
|
||||
{
|
||||
options.TokenValidationParameters = new TokenValidationParameters
|
||||
{
|
||||
ValidateIssuer = true,
|
||||
ValidateAudience = true,
|
||||
ValidateLifetime = true,
|
||||
ValidateIssuerSigningKey = true,
|
||||
ValidIssuer = builder.Configuration["Jwt:Issuer"],
|
||||
ValidAudience = builder.Configuration["Jwt:Audience"],
|
||||
IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(builder.Configuration["Jwt:Key"] ?? string.Empty)),
|
||||
NameClaimType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"
|
||||
};
|
||||
});
|
||||
// builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
|
||||
// .AddJwtBearer(options =>
|
||||
// {
|
||||
// options.TokenValidationParameters = new TokenValidationParameters
|
||||
// {
|
||||
// ValidateIssuer = true,
|
||||
// ValidateAudience = true,
|
||||
// ValidateLifetime = true,
|
||||
// ValidateIssuerSigningKey = true,
|
||||
// ValidIssuer = builder.Configuration["Jwt:Issuer"],
|
||||
// ValidAudience = builder.Configuration["Jwt:Audience"],
|
||||
// IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(builder.Configuration["Jwt:Key"] ?? string.Empty)),
|
||||
// NameClaimType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"
|
||||
// };
|
||||
// });
|
||||
|
||||
builder.Services.AddControllers();
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
|
||||
Reference in New Issue
Block a user